Skip to content

fix(ci): push the regenerate-lockfiles branch as the App - #7355

Merged
mitsudome-r merged 1 commit into
autowarefoundation:mainfrom
xmfcx:fix-regenerate-lockfiles-push-credentials
Oct 16, 2026
Merged

mitsudome-r merged 1 commit into
autowarefoundation:mainfrom
xmfcx:fix-regenerate-lockfiles-push-credentials

Conversation

@xmfcx

@xmfcx xmfcx commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

The open-pr job of regenerate-lockfiles.yaml cannot push its branch. This PR fixes it.

The fix adds persist-credentials: false to the 🛒 Check out repository step of the open-pr job. It changes nothing else.

The cause

Run 38670168549 regenerated all four lockfiles. Then its open-pr job failed at git push with this error:

remote: error: GH013: Repository rule violations found for refs/heads/ci/regenerate-lockfiles.
remote: - Cannot create ref due to creations being restricted.

The push did not run as the App:

  • The job makes a token for the awf-autoware-bot App (id 153766). This App is in the bypass list of the branch rulesets.
  • The job then runs gh auth setup-git with this token, and runs git push.
  • But actions/checkout keeps its credentials by default. The log of the checkout step shows persist-credentials: true, and the step sets http.https://github.com/.extraheader AUTHORIZATION: basic *** with GITHUB_TOKEN.
  • Git sends this header with the push. As a result, the push runs as github-actions[bot] (App 15368), which has no bypass. Git never uses the credential helper of gh auth setup-git.

With persist-credentials: false, the checkout sets no header. Then git push uses the App token through gh auth setup-git. The gh pr create step already uses the App token through GH_TOKEN.

No ruleset change is necessary.

How was this PR tested?

See Verification below.

AI usage

AI usage: Written with Claude Code in Breeze, from the log of the failed run 38670168549.

Self-review: One review round by a separate AI session with a clean context, on 1ceff85. It found no blocker. It confirmed the cause with the run log, the App ids, and the ruleset bypass list. It also found that no step of open-pr before the push needs the checkout credentials.

Verification: Only `pre-commit` ran on the changed file, and all hooks passed. The fixed workflow did not run yet.

pre-commit run --files .github/workflows/regenerate-lockfiles.yaml

  • check yaml, prettier, and yamllint passed. The other hooks passed or skipped.
  • Did not run: actionlint, because it is not installed on this host.
  • Did not run: the fixed workflow. It needs the App secrets and the rulesets of this repository, so a run on a fork proves nothing. A new workflow_dispatch run on main after the merge shows the result.

The checkout step of the open-pr job kept the GITHUB_TOKEN credentials.
So git push ran as github-actions[bot], which the branch-creation
rulesets block. Do not persist these credentials, so that the push uses
the App token from gh auth setup-git.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx xmfcx added the run:health-check Run health-check label Oct 15, 2026
@xmfcx xmfcx self-assigned this Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@mitsudome-r
mitsudome-r merged commit 1c44314 into autowarefoundation:main Oct 16, 2026
29 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:health-check Run health-check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants