Add support to pass env vars to in addition to args to configure cmk - #220
Conversation
|
✅ Build complete for PR #220. 📦 Binary artifacts are available in the workflow run (expires on September 13, 2026).
|
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Adds support for configuring cmk via environment variables that mirror existing CLI flags, with documented precedence rules.
Changes:
- Introduces env-var constants for the supported configuration knobs.
- Applies env-var fallbacks in
main()when CLI flags aren’t provided. - Updates help text and README documentation to list supported environment variables and precedence.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| config/config.go | Adds env-var constant names and improves config-file-not-found error output. |
| cmk.go | Implements env-var fallback logic for CLI flags before config loading. |
| cmd/command.go | Updates CLI help text to document env-var equivalents and precedence. |
| README.md | Documents supported environment variables and intended precedence vs flags/config. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
306f2a4 to
a2b40f1
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
a2b40f1 to
d29469c
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Explicit -u/CMK_URL values equal to the default endpoint can currently be ignored due to the URL override gate, and the -o help text is inconsistent with the actual supported output formats.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Lite
| } | ||
| } | ||
|
|
||
| cfg := config.NewConfig(configFilePath) | ||
|
|
| -u CloudStack's API endpoint URL | ||
| -s CloudStack user's secret Key | ||
| -k CloudStack user's API Key | ||
| -o API response output format: json, text, table, column, csv (env: CMK_OUTPUT) |
borisstoyanov
left a comment
There was a problem hiding this comment.
LGTM, copilot comments seems largely noise
No description provided.