Skip to content

fix: activate GitHub App configuration in shared workflow configs#21329

Merged
pelikhan merged 5 commits intomainfrom
copilot/fix-github-app-configuration
Mar 17, 2026
Merged

fix: activate GitHub App configuration in shared workflow configs#21329
pelikhan merged 5 commits intomainfrom
copilot/fix-github-app-configuration

Conversation

Copy link
Contributor

Copilot AI commented Mar 17, 2026

Several shared workflow configs had GitHub App configuration either commented out or using the wrong field name, causing workflows that import them to silently skip GitHub App authentication.

Changes

  • shared/safe-output-app.md — uncomment safe-outputs.github-app block (using the correct field name that the Go parser expects):
    safe-outputs:
      github-app:
        app-id: ${{ vars.APP_ID }}
        private-key: ${{ secrets.APP_PRIVATE_KEY }}
  • shared/app-config.md — rename safe-outputs.appsafe-outputs.github-app to match the Go parser's expected field name (outputMap["github-app"] in safe_outputs_config.go).
  • shared/activation-app.md — uncomment on.github-app: block to activate GitHub App authentication for the activation job in all 11 importing workflows (code-simplifier, dead-code-remover, ubuntu-image-analyzer, daily-testify-uber-super-expert, breaking-change-checker, daily-rendering-scripts-verifier, code-scanning-fixer, issue-monster, slide-deck-maintainer, daily-file-diet, daily-safe-output-optimizer).
  • pkg/workflow/compiler_safe_outputs_job.go — fix off-by-one bug in the app token step insertion index: replace hardcoded step counts (6 for checkout, 4 for setup) with actual len() calls against the real step-generation functions. The hardcoded 6 was wrong for dev mode, which generates 7 lines (includes repository:), causing the echo "GH_AW_AGENT_OUTPUT=..." line to be embedded inside the with: block of create-github-app-token instead of in its own step.
  • 16 lock files — now include Generate GitHub App token and Invalidate GitHub App token steps (or Generate GitHub App token for skip-if checks) with correct YAML structure.
  • testdata/wasm_golden/fixtures/shared/safe-output-app.md — added fixture mirror with config kept commented out, consistent with the github-mcp-app.md fixture convention.
Original prompt

Review GitHub-app configuration for dependencies and fix

See safe-output-app.md for env vars and

See error at https://github.com/github/gh-aw/actions/runs/23175963022/job/67338791074


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix GitHub-app configuration for dependencies fix: activate GitHub App configuration in safe-output-app.md Mar 17, 2026
Copilot AI requested a review from pelikhan March 17, 2026 03:42
@pelikhan pelikhan added the smoke label Mar 17, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready.

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions github-actions bot removed the smoke label Mar 17, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...]

# app-id: ${{ vars.APP_ID }}
# private-key: ${{ secrets.APP_PRIVATE_KEY }}
safe-outputs:
app:
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot fix app to github-app

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 144aa46 — renamed app: to github-app: to match the field name the Go parser expects (outputMap["github-app"] in safe_outputs_config.go). Also fixed a pre-existing off-by-one in the token insertion index that was exposed once the app config became active (hardcoded 6 for checkout step vs actual 7 lines in dev mode).

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

… consolidated safe outputs job

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 17, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw QM54CA-R2u1ieV95--norc on_test.go est.go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw n_pins.go n_pins_integratixterm-color n_pins_logging_test.go n_pi�� n_reference.go n_reference_test.go (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha -dirty&#34; -o gh-aw ./cmd/gh-aw (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility ithub/workflows user.email er: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabl/home/REDACTED/work/gh-aw/gh-aw/.github/workflows (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility xterm-color (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha k/gh-aw/gh-aw/.github/workflows (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from pelikhan March 17, 2026 04:08
@pelikhan pelikhan added the smoke label Mar 17, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...]

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions github-actions bot removed the smoke label Mar 17, 2026
@github-actions

This comment has been minimized.

@pelikhan
Copy link
Contributor

@copilot import safe-output-map.md in the changeset.md agentic workflow

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

Copy link
Contributor Author

Copilot AI commented Mar 17, 2026

@copilot import safe-output-map.md in the changeset.md agentic workflow

safe-output-map.md doesn't exist in the shared/ directory. Could you clarify what it should contain? Note that changeset.md already imports safe-output-app.md (which provides the safe-outputs.github-app GitHub App credentials). If you meant a different file or want a new shared config created, please share the intended content.

@pelikhan pelikhan marked this pull request as ready for review March 17, 2026 04:31
Copilot AI review requested due to automatic review settings March 17, 2026 04:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enables GitHub App authentication for safe-outputs by activating the shared app configuration and fixing step insertion so the minted token is injected at the correct position in generated workflows.

Changes:

  • Uncomment/activate safe-outputs.github-app configuration in the shared safe-output-app.md.
  • Fix safe-outputs job compilation logic to compute the GitHub App token step insertion index from actual generated step YAML lengths.
  • Regenerate affected workflow lock files to include “Generate GitHub App token” / “Invalidate GitHub App token” steps; add a wasm golden fixture mirror for the shared config.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/shared/safe-output-app.md Activates the safe-outputs.github-app config so workflows actually mint an app token for safe-outputs.
pkg/workflow/compiler_safe_outputs_job.go Adjusts insertion-index calculation to use real generated step lengths (instead of hardcoded counts).
.github/workflows/artifacts-summary.lock.yml Regenerated lock file now uses the minted app token for safe-outputs steps and revokes it afterward.
.github/workflows/changeset.lock.yml Regenerated lock file now uses the minted app token for safe-outputs steps and revokes it afterward.
.github/workflows/daily-file-diet.lock.yml Regenerated lock file now uses the minted app token for safe-outputs steps and revokes it afterward.
.github/workflows/daily-mcp-concurrency-analysis.lock.yml Regenerated lock file now uses the minted app token for safe-outputs steps and revokes it afterward.
.github/workflows/daily-testify-uber-super-expert.lock.yml Regenerated lock file now uses the minted app token for safe-outputs steps and revokes it afterward.
pkg/workflow/testdata/wasm_golden/fixtures/shared/safe-output-app.md Adds a wasm golden fixture mirror of the shared safe-output app configuration (kept commented).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@@ -266,10 +266,8 @@ func (c *Compiler) buildConsolidatedSafeOutputsJob(data *WorkflowData, mainJobNa
// Count setup action steps (checkout + setup if in dev mode without action-tag, or just setup)
setupActionRef := c.resolveActionReference("./actions/setup", data)
if setupActionRef != "" {
@@ -0,0 +1,31 @@
---
#safe-outputs:
# app:
@pelikhan
Copy link
Contributor

@copilot update app-config.md and activation-app.md to use the github-app field instead of app

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 17, 2026

@copilot update app-config.md and activation-app.md to use the github-app field instead of app

Done in 04c5583app-config.md now uses safe-outputs.github-app: to match the Go parser's expected field name. activation-app.md already used on.github-app: so no change was needed there.

Copilot AI changed the title fix: activate GitHub App configuration in safe-output-app.md fix: activate GitHub App configuration in safe-output-app.md and related shared configs Mar 17, 2026
@pelikhan
Copy link
Contributor

@copilot rewrite

…ted lock files

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 17, 2026

@copilot rewrite

Done in 6eb3e2b — uncommented the on.github-app: block in activation-app.md and recompiled the 11 affected lock files to include the Generate GitHub App token for skip-if checks step.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw mRJ5vOs8-PiP (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title fix: activate GitHub App configuration in safe-output-app.md and related shared configs fix: activate GitHub App configuration in shared workflow configs Mar 17, 2026
@pelikhan pelikhan added the smoke label Mar 17, 2026
@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready.

@github-actions github-actions bot removed the smoke label Mar 17, 2026
@github-actions
Copy link
Contributor

💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...]

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.53.0
jq 1.7
yq 4.52.4
curl 8.5.0
gh 2.87.3
node 20.20.1
python3 3.12.3
go 1.24.13
java 10.0.102
dotnet 10.0.102

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test ·

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@pelikhan pelikhan merged commit 5ef1312 into main Mar 17, 2026
200 of 203 checks passed
@pelikhan pelikhan deleted the copilot/fix-github-app-configuration branch March 17, 2026 05:12
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.

3 participants