Skip to content

ci(coverage): push refreshed map via GitHub App token (ruleset bypass)#1465

Merged
sbryngelson merged 1 commit into
MFlowCode:masterfrom
sbryngelson:coverage-refresh-app-token
May 30, 2026
Merged

ci(coverage): push refreshed map via GitHub App token (ruleset bypass)#1465
sbryngelson merged 1 commit into
MFlowCode:masterfrom
sbryngelson:coverage-refresh-app-token

Conversation

@sbryngelson
Copy link
Copy Markdown
Member

Why

The post-merge coverage-refresh run proved the full pipeline works except the final push: git commit --no-verify succeeded, but the push to master was rejected:

remote: error: GH013: Repository rule violations found for refs/heads/master.
remote: - Changes must be made through a pull request.

The master repository ruleset requires PRs, and its bypass list only honors org-admins and the repo Admin role — not the fine-grained PAT behind CACHE_PUSH_TOKEN. Token permissions were never the issue; ruleset bypass identity is.

Fix

Use a dedicated GitHub App (mfc-map-bot, contents:write) as the push identity:

  • The app is now an Integration bypass actor on the master ruleset, so its push satisfies the require-PR rule.
  • The job mints a short-lived installation token via actions/create-github-app-token@v3 (secrets MAP_BOT_APP_ID + MAP_BOT_APP_PRIVATE_KEY, already configured) and pushes with it.

Unlike a personal PAT, this identity doesn't expire and isn't tied to a person.

Verification plan

After merge, dispatch coverage-refresh once: the SLURM collect + --no-verify commit are already verified green; this run should finally land a mfc-map-bot[bot] test: refresh coverage map [skip ci] commit on master.

CACHE_PUSH_TOKEN is now unused and can be deleted as a follow-up.

The default CACHE_PUSH_TOKEN could not push to master: the master repository ruleset requires PRs, and its bypass list only honors org-admins / repo-admin-role (not fine-grained PATs). Mint a short-lived installation token from the mfc-map-bot GitHub App (contents:write), which is now an Integration bypass actor on that ruleset, and push with it via actions/create-github-app-token@v3.
Copilot AI review requested due to automatic review settings May 30, 2026 18:16
@sbryngelson sbryngelson merged commit 78dd50f into MFlowCode:master May 30, 2026
20 checks passed
Copy link
Copy Markdown
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants