Skip to content

Skip GHES auto-detection during CI initialization - #54112

Merged
pelikhan merged 3 commits into
mainfrom
copilot/remove-ghes-false-aw-json
Aug 20, 2026
Merged

Skip GHES auto-detection during CI initialization#54112
pelikhan merged 3 commits into
mainfrom
copilot/remove-ghes-false-aw-json

Conversation

CopilotAI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

GHES detection during init can be misled by gh-proxy environment settings and must not run in CI. The repository should also rely on automatic detection rather than forcing ghes: false.

  • Initialization guard

    • Skip GHES configuration whenever CI is detected.
    • Preserve GHES auto-detection for local, non-CI initialization.
  • Regression coverage

    • Verify GHES configuration still occurs for non-CI GHES repositories.
    • Verify CI runs do not create or modify aw.json.
  • Repository configuration

    • Remove the explicit ghes: false entry from .github/workflows/aw.json.
ifIsRunningInCI() {
returnfalse, nil
}

CopilotAIand others added 3 commits August 20, 2026 01:07
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title Skip GHES auto-detection during CI initSkip GHES auto-detection during CI initializationAug 20, 2026
CopilotAI requested a review from pelikhanAugust 20, 2026 01:14
@pelikhan
pelikhan marked this pull request as ready for review August 20, 2026 01:15
CopilotAI balanced review requested due to automatic review settings August 20, 2026 01:15
@pelikhan
pelikhan merged commit e589f15 into mainAug 20, 2026
1 check passed
@pelikhan
pelikhan deleted the copilot/remove-ghes-false-aw-json branch August 20, 2026 01:15
@github-actions

Copy link
Copy Markdown
Contributor

Nice work, @Copilot 👋 — this PR looks ready to go! You've successfully centralized the CI detection guard for GHES configuration, preventing false positives from gh-proxy environment settings during CI runs. The changes are focused, the tests are in place, and the description clearly covers the problem, solution, and regression coverage. The refactoring nicely moves the CI check into ensureGHESRepoConfig() where it belongs, reducing duplication and making the intent clearer. This is a solid quality contribution that strengthens the platform's reliability.

Generated by ✅ Contribution Check · auto · 56.4 AIC · ⌖ 6.63 AIC · ⊞ 9.2K ·

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents GHES auto-detection from changing repository configuration during CI initialization.

Changes:

  • Skips GHES configuration when CI is detected.
  • Adds CI and non-CI regression coverage.
  • Removes the explicit GHES override and synchronizes the dispatcher skill list.
Show a summary per file
FileDescription
pkg/cli/init.goAdds the CI guard for GHES configuration.
pkg/cli/init_test.goTests CI skipping and non-CI detection.
.github/workflows/aw.jsonRemoves the forced ghes: false setting.
.github/skills/agentic-workflows/SKILL.mdAdds jobs.md to the generated file list.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment threadpkg/cli/init_test.go
Comment on lines +524 to +525
if _, err := os.Stat(filepath.Join(tempDir, ".github", "workflows", "aw.json")); !os.IsNotExist(err) {
t.Fatal("ensureGHESRepoConfig should not create aw.json in CI")
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.2

Sign up for freeto 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.

3 participants

@pelikhan