Skip to content

Conversation

@rgarcia
Copy link
Contributor

@rgarcia rgarcia commented Feb 9, 2026

Summary

Switches workflows from using GITHUB_TOKEN/GH_PAT to the kernel-internal GitHub App token, aligning with the pattern used in the main kernel repo.

Changes

fix-ci.yaml

  • Added app token generation step using actions/create-github-app-token@v1
  • Updated checkout action to use app token for push access
  • Replaced secrets.GITHUB_TOKEN with steps.app-token.outputs.token in GH_TOKEN env var
  • Updated git identity to kernel-internal[bot] / 260533166+kernel-internal[bot]@users.noreply.github.com

release.yaml

  • Added app token generation step using actions/create-github-app-token@v1
  • Replaced secrets.GH_PAT with steps.app-token.outputs.token in GITHUB_TOKEN env var for GoReleaser

Benefits

  • Consistent authentication pattern across repos
  • Better security with GitHub App tokens vs PATs
  • Proper attribution for automated commits/releases

Testing

The workflows will use the existing ADMIN_APP_ID and ADMIN_APP_PRIVATE_KEY secrets already configured in the repository.


Note

Medium Risk
Changes release and automation credentials/permissions; misconfiguration could break CI auto-fix pushes or tagged releases/publishing even though no product code changes.

Overview
Switches the Fix CI Failures and Release CLI GitHub Actions workflows to authenticate via a generated GitHub App token (actions/create-github-app-token@v1) instead of GITHUB_TOKEN/PATs.

The CI-fix workflow now checks out/pushes and runs gh using the app token and updates commit attribution to kernel-internal[bot]; the release workflow similarly feeds the app token to GoReleaser (scoped to cli and homebrew-tap).

Written by Cursor Bugbot for commit 92b320a. This will update automatically on new commits. Configure here.

- Add app token generation step using actions/create-github-app-token@v1
- Replace GITHUB_TOKEN/GH_PAT references with app token
- Update git identity to kernel-internal[bot]
- Add token to checkout action for fix-ci workflow

This aligns with the kernel repo's pattern of using the kernel-internal
GitHub App for automated commits and releases.
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

@cursor
Copy link

cursor bot commented Feb 9, 2026

Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.

  • ✅ Fixed: App token lacks cross-repo access for homebrew tap
    • Added 'repositories: cli,homebrew-tap' to the create-github-app-token step so the generated token has access to both the current repo (for releases) and the kernel/homebrew-tap repo (for formula updates).

Create PR

Or push these changes by commenting:

@cursor push d312379d71
Preview (d312379d71)
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -19,6 +19,7 @@
         with:
           app-id: ${{ secrets.ADMIN_APP_ID }}
           private-key: ${{ secrets.ADMIN_APP_PRIVATE_KEY }}
+          repositories: cli,homebrew-tap
 
       - name: Checkout
         uses: actions/checkout@v4

@rgarcia
Copy link
Contributor Author

rgarcia commented Feb 9, 2026

@cursor push d312379

The actions/create-github-app-token action scopes tokens to the current
repository by default. Since .goreleaser.yaml pushes a homebrew formula
to kernel/homebrew-tap, the token needs explicit access to that repo.

Add 'repositories: cli,homebrew-tap' to ensure the generated token can
access both the current repo (for releases) and the homebrew-tap repo
(for formula updates).

Applied via @cursor push command
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