Skip to content

Wire up EXTRA_COMMIT_GITHUB_TOKEN for trigger workflows#480

Merged
strawgate merged 5 commits intomainfrom
copilot/wire-up-github-token
Feb 28, 2026
Merged

Wire up EXTRA_COMMIT_GITHUB_TOKEN for trigger workflows#480
strawgate merged 5 commits intomainfrom
copilot/wire-up-github-token

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

Trigger workflows now automatically forward EXTRA_COMMIT_GITHUB_TOKEN when the corresponding lock workflow accepts it, so workflow-created commits can trigger downstream CI reliably.

Changes

  • Updated scripts/dogfood.sh to:

    • skip syncing trigger workflows that are no longer dogfooded in this repository (bug-exterminator, code-duplication-fixer, code-simplifier, newbie-contributor-fixer, pr-actions-fixer, pr-review-addresser, small-problem-fixer, test-improver, text-beautifier), and
    • inject EXTRA_COMMIT_GITHUB_TOKEN: $\{\{ secrets.EXTRA_COMMIT_GITHUB_TOKEN }} into generated trigger workflow secrets only when .github/workflows/gh-aw-(workflow).lock.yml declares EXTRA_COMMIT_GITHUB_TOKEN.
  • Regenerated trigger workflows accordingly:

    • Added EXTRA_COMMIT_GITHUB_TOKEN to:
      • trigger-mention-in-issue.yml
      • trigger-mention-in-pr-by-id.yml
      • trigger-mention-in-pr.yml
    • Removed obsolete trigger workflows:
      • trigger-bug-exterminator.yml
      • trigger-code-duplication-fixer.yml
      • trigger-code-simplifier.yml
      • trigger-newbie-contributor-fixer.yml
      • trigger-pr-actions-fixer.yml
      • trigger-pr-review-addresser.yml
      • trigger-small-problem-fixer.yml
      • trigger-test-improver.yml
      • trigger-text-beautifier.yml
  • Fixes Wire up extra commit GitHub token for triggers in this repo #478

Generated by Update PR Body for issue #480

Copilot AI and others added 2 commits February 28, 2026 18:36
Modify scripts/dogfood.sh to auto-inject the EXTRA_COMMIT_GITHUB_TOKEN
secret into trigger files whose corresponding lock workflows accept it.
This enables commits made by these workflows to trigger downstream CI
runs, since the default GITHUB_TOKEN doesn't trigger other workflows.

Affected trigger files (12):
- trigger-bug-exterminator.yml
- trigger-code-duplication-fixer.yml
- trigger-code-simplifier.yml
- trigger-mention-in-issue.yml
- trigger-mention-in-pr-by-id.yml
- trigger-mention-in-pr.yml
- trigger-newbie-contributor-fixer.yml
- trigger-pr-actions-fixer.yml
- trigger-pr-review-addresser.yml
- trigger-small-problem-fixer.yml
- trigger-test-improver.yml
- trigger-text-beautifier.yml

Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
Use temp file + mv pattern instead of sed -i, matching existing
awk pattern in dogfood.sh and avoiding macOS sed incompatibility.

Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
Copilot AI changed the title [WIP] Wire up extra commit GitHub token for triggers Wire up EXTRA_COMMIT_GITHUB_TOKEN for trigger workflows Feb 28, 2026
@strawgate strawgate marked this pull request as ready for review February 28, 2026 18:46
@coderabbitai
Copy link

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 20c0cf9 and 6c6d098.

📒 Files selected for processing (4)
  • .github/workflows/trigger-code-simplifier.yml
  • .github/workflows/trigger-pr-review-addresser.yml
  • .github/workflows/trigger-test-improver.yml
  • scripts/dogfood.sh
💤 Files with no reviewable changes (3)
  • .github/workflows/trigger-pr-review-addresser.yml
  • .github/workflows/trigger-test-improver.yml
  • .github/workflows/trigger-code-simplifier.yml

📝 Walkthrough

Walkthrough

Removes several auto-generated trigger workflows from .github/workflows (bug-exterminator, code-duplication-fixer, code-simplifier, newbie-contributor-fixer, pr-actions-fixer, pr-review-addresser, small-problem-fixer, test-improver, text-beautifier). Adds EXTRA_COMMIT_GITHUB_TOKEN to the secrets mapping in mention-related workflows (trigger-mention-in-issue, trigger-mention-in-pr-by-id, trigger-mention-in-pr). Updates scripts/dogfood.sh to exclude those workflows from dogfooding and to inject EXTRA_COMMIT_GITHUB_TOKEN into generated lock workflows when present. No public/exported APIs were changed.

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed PR successfully implements all core requirements from issue #478: automatic EXTRA_COMMIT_GITHUB_TOKEN injection via dogfood.sh script, token addition to relevant trigger workflows, and removal of obsolete workflows.
Out of Scope Changes check ✅ Passed All changes align with stated objectives. Workflow deletions address phasing out fixer workflows as documented in commit messages and PR description.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch copilot/wire-up-github-token

Comment @coderabbitai help to get the list of available commands and usage tips.

@strawgate
Copy link
Collaborator

@copilot this is only needed for workflows which pushes changes to a branch or makes a pr

Copy link
Contributor Author

Copilot AI commented Feb 28, 2026

@copilot this is only needed for workflows which pushes changes to a branch or makes a pr

That's exactly what's implemented — the script checks if the corresponding .lock.yml declares EXTRA_COMMIT_GITHUB_TOKEN before injecting it, and only workflows that push commits or create PRs declare that secret. All 12 affected triggers are either PR creators (bug-exterminator, code-duplication-fixer, code-simplifier, mention-in-issue, newbie-contributor-fixer, small-problem-fixer, test-improver, text-beautifier) or branch pushers (mention-in-pr, mention-in-pr-by-id, pr-actions-fixer, pr-review-addresser). No read-only/detector workflows get the token.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Requesting changes: this diff removes six generated trigger workflows (trigger-bug-exterminator.yml, trigger-code-duplication-fixer.yml, trigger-newbie-contributor-fixer.yml, trigger-pr-actions-fixer.yml, trigger-small-problem-fixer.yml, trigger-text-beautifier.yml), which disables their workflow_dispatch/scheduled entrypoints and prevents the corresponding lock workflows from running. Please restore/regenerate those trigger files and keep only the intended EXTRA_COMMIT_GITHUB_TOKEN wiring changes.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Phase out fixer workflows by adding them to the exclusion list:
bug-exterminator, code-duplication-fixer, code-simplifier,
newbie-contributor-fixer, pr-actions-fixer, pr-review-addresser,
small-problem-fixer, test-improver, text-beautifier

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EXCLUDED_WORKFLOWS=(
"bug-exterminator"
"code-duplication-fixer"
"code-simplifier"
Copy link
Contributor

Choose a reason for hiding this comment

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

[HIGH] Non-fixer workflows are being unintentionally disabled

Adding code-simplifier, pr-review-addresser, and test-improver to EXCLUDED_WORKFLOWS removes their generated trigger files (rm -f .github/workflows/trigger-$dir.yml), which drops their schedule/workflow_dispatch (and pull_request_review for addresser) entrypoints.

Concrete impact: after running scripts/dogfood.sh, these three workflows no longer have trigger wrappers even though their workflow sources still exist (gh-agent-workflows/*/example.yml) and their lock workflows declare EXTRA_COMMIT_GITHUB_TOKEN, so token wiring for them never happens and they stop being invokable via trigger workflows.

@strawgate strawgate merged commit d32120a into main Feb 28, 2026
17 checks passed
@strawgate strawgate deleted the copilot/wire-up-github-token branch February 28, 2026 19:24
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.

Wire up extra commit GitHub token for triggers in this repo

2 participants