Skip to content

Fix env overrides when config file doesn't exist#7

Merged
tutunak merged 2 commits intodevelopfrom
copilot/sub-pr-1
Feb 1, 2026
Merged

Fix env overrides when config file doesn't exist#7
tutunak merged 2 commits intodevelopfrom
copilot/sub-pr-1

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 1, 2026

config.Load() returned early when the config file was missing, skipping environment variable overrides. This prevented env-only configuration (e.g., JIRA_API_TOKEN, JIRA_URL in CI/CD).

Changes:

  • Call applyEnvOverrides() before returning when os.IsNotExist(err) in Load()
  • Add test coverage for env-only configuration without config file

Before:

data, err := os.ReadFile(path)
if os.IsNotExist(err) {
    return cfg, nil  // env vars ignored
}

After:

data, err := os.ReadFile(path)
if os.IsNotExist(err) {
    cfg.applyEnvOverrides()
    return cfg, nil
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: tutunak <12380949+tutunak@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback from review on Develop pull request Fix env overrides when config file doesn't exist Feb 1, 2026
Copilot AI requested a review from tutunak February 1, 2026 09:03
@tutunak tutunak marked this pull request as ready for review February 1, 2026 09:04
@tutunak tutunak merged commit 1df7b2b into develop Feb 1, 2026
1 check passed
@tutunak tutunak deleted the copilot/sub-pr-1 branch February 1, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants