Skip to content

fix: grant Renovate statuses write permission - #10316

Merged
cryptodev-2s merged 1 commit into
mainfrom
fix/renovate-statuses-permission
Sep 21, 2026
Merged

cryptodev-2s merged 1 commit into
mainfrom
fix/renovate-statuses-permission

Conversation

@cryptodev-2s

@cryptodev-2s cryptodev-2s commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Explanation

After #10311 the lockfile update works and Renovate pushes a branch, but still no pull request. It aborts one step later:

INFO: Branch created (commitSha 8aadb644...)
DEBUG: Updating renovate/stability-days status check state to green
POST https://api.github.com/repos/MetaMask/core/statuses/8aadb644... = 403
GitHub failure: Resource not accessible by integration
x-accepted-github-permissions: statuses=write
DEBUG: Caught error setting branch status - aborting
Error: integration-unauthorized
INFO: Repository has changed during renovation - aborting

Renovate posts a commit status on every branch it pushes, and our token grant has no statuses scope, so the 403 ends the whole repository run before ensurePr. The closing "Repository has changed" line is just how that abort surfaces, nothing had actually changed.

The alternative was disabling the checks with statusCheckNames, but renovate/artifacts and renovate/config-validation are how a partially failed lockfile update or a bad renovate.json show up on the pull request instead of only in a debug log, so they are worth keeping.

Important

Depends on consensys-vertical-apps/token-exchange-service#182, which grants the permission. Merging this first makes the token exchange reject the request and the job fail outright, so it stays a draft until that lands.

References

Follows #10311. Part of WPC-1161.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Workflow-only permission scope change for the Renovate bot token; no application runtime impact, but the job fails until the token exchange service allows statuses: write.

Overview
Renovate was failing after pushing branches because the exchanged GitHub token could not set commit statuses (403, statuses=write required), which aborted the run before pull requests were created.

This adds statuses: write to the permissions requested in the Renovate workflow’s get-token step so Renovate can mark checks such as renovate/stability-days and keep renovate/artifacts / renovate/config-validation visible on PRs.

Note: The token exchange service must grant the same permission (see PR dependency); merging before that service change will cause token requests to fail.

Reviewed by Cursor Bugbot for commit 481f6b7. Bugbot is set up for automated code reviews on this repo. Configure here.

@cryptodev-2s
cryptodev-2s marked this pull request as ready for review September 21, 2026 14:40
@cryptodev-2s
cryptodev-2s requested a review from a team as a code owner September 21, 2026 14:40
@cryptodev-2s cryptodev-2s self-assigned this Sep 21, 2026
@cryptodev-2s
cryptodev-2s deployed to default-branch September 21, 2026 14:41 — with GitHub Actions Active
@cryptodev-2s cryptodev-2s assigned Mrtenz and unassigned Mrtenz Sep 21, 2026
@cryptodev-2s
cryptodev-2s requested a review from Mrtenz September 21, 2026 14:41
@cryptodev-2s
cryptodev-2s added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit f0ba7f6 Sep 21, 2026
346 checks passed
@cryptodev-2s
cryptodev-2s deleted the fix/renovate-statuses-permission branch September 21, 2026 14:44
pull Bot pushed a commit to Reality2byte/core that referenced this pull request Sep 21, 2026
## Explanation

MetaMask#10316 broke the Renovate job outright. Asking the token exchange for
`statuses: write` now fails before Renovate even starts:

```
##[error]Token exchange failed: 500 Internal Server Error
{"status":"error","message":"Failed to create installation token from GitHub"}
```

That is GitHub refusing to mint the token, not the policy rejecting it.
consensys-vertical-apps/token-exchange-service#182 allows the
permission, but the `metamask-ci` App installation does not hold Commit
statuses, and a policy can only narrow what the App already has.
Granting it means an org level App permission change that every
installation has to accept, which is a lot of process for four
informational checks.

So this reverts the permission request and stops Renovate posting the
statuses at all. With every entry in `statusCheckNames` set to null,
Renovate skips the POST rather than 403ing on it
([`status-checks.ts:91`](https://github.com/renovatebot/renovate/blob/main/lib/workers/repository/update/branch/status-checks.ts#L91)),
which was what aborted the run before the pull request got created.

What we lose is the checks appearing on the pull request. Artifact and
config errors still show up in the run log and on the dependency
dashboard. `minimumReleaseAge` is unaffected, it is enforced internally
whether or not the status is posted.

## References

Reverts MetaMask#10316. Follows MetaMask#10311. Part of WPC-1161.

## Checklist

- [ ] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> CI-only changes to Renovate permissions and config with no runtime or
application code impact.
> 
> **Overview**
> Fixes the Renovate workflow failing at token exchange by **removing
`statuses: write`** from the MetaMask token-exchange permissions in
`.github/workflows/renovate.yml`. The `metamask-ci` app installation
does not have commit-status scope, so requesting it caused token minting
to fail before Renovate could run.
> 
> **Disables Renovate’s GitHub commit statuses** by adding
`statusCheckNames` in `renovate.json` with `artifactError`,
`configValidation`, `mergeConfidence`, and `minimumReleaseAge` set to
`null`, so Renovate skips posting those checks instead of erroring.
Dependency updates and internal rules like `minimumReleaseAge` still
apply; only the PR-visible status checks are dropped.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
e5288f2. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

This branch was successfully deployed

1 active deployment
default-branch 481f6b7d Deployed Sep 21, 2026 by cryptodev-2s via Determine whether this PR is a release PR #4304
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