chore: repoint repository references and fix npm publish permissions - #1041
Merged
Conversation
The `repository`, `homepage`, and `bugs` fields named a repository URL that no longer resolves directly. `yarn.config.cjs` derives the latter two from the root manifest's `repository.url`, so this is one edit plus `yarn constraints --fix`; the private packages, which the constraint does not cover, are updated to match. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`auto-changelog validate` derives these links from each manifest's `repository` field and fails on any mismatch, so they follow the previous commit. Inline pull request links are left alone: those pull requests are where the links say they are. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The scanner depends on secrets this repository cannot resolve, and `analyse-code` gates `all-jobs-complete`, so every pull request would fail on it. Removing the job also removes a duplicate run: the workflow declared its own `push`/`pull_request` triggers alongside the `workflow_call` from `main.yml`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
An unresolvable team matches nobody rather than erroring, so review was silently never requested. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
For packages that already exist on npm, `action-npm-publish@v6` unsets the auth token and publishes via OIDC. Without `id-token: write`, which is never granted by default, it prints "OIDC is not available", runs `yarn pack`, and exits 0 having published nothing. The action has been on v6 since #954 without a release, so this path has never run here. The Slack notification is dropped along with it: the webhook and the subteam it addressed are both unreachable from this repository. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The README, setup guide, and wiki links named a repository URL that no longer resolves directly. The two `MetaMask-planning` references pointed into a private repository; both comments already describe the primitive they guard against, so the reference bought the reader nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A called workflow's jobs cannot request more than the caller grants, and an enumerated `permissions` block sets every unlisted scope to `none`. Without this the publish jobs' `id-token: write` is an escalation and fails at run time. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
The dry run has no `environment`, so it runs before the `npm-publish` approval gate. An OIDC token is exchangeable at npm for a publish credential, which would make that gate conventional rather than enforced. An explicit block is required to withhold it: the caller grants `id-token: write` for the real publish job, and jobs without their own block inherit it. Also drop an issue reference whose siblings are gone; a bare number now reads as an issue in this repository. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
repository,homepage, andbugsmetadata, the changelog release links, the code owner team, and various documentation links all named a repository URL and a team that no longer resolve directly. This corrects them, and removes two CI dependencies that cannot be satisfied from here.It also fixes a latent publishing bug found along the way. For packages that already exist on npm,
action-npm-publish@v6unsets the auth token and publishes via OIDC. Neither publish job declared apermissionsblock, andid-token: writeis never granted by default, so the action would print "OIDC is not available", fall back toyarn pack, and exit 0 having published nothing. The action has been on v6 since #954 without an intervening release, so this path has never actually run.Granting the token takes two edits, not one. A called workflow's jobs cannot request more than the caller grants, and an enumerated
permissionsblock sets every unlisted scope tonone— somain.yml's caller had to widen too, or the request would have been an escalation and failed at run time.actionlintdoes not check permission subsetting across aworkflow_call, so nothing local catches this.Only the real publish job gets the token.
publish-npm-dry-rundeclares noenvironment, so it runs ahead of thenpm-publishapproval gate; an OIDC token there is exchangeable at npm for a publish credential, which would leave that gate conventional rather than enforced. It therefore carries an explicitcontents: readblock to withhold what the caller now grants. Worth pairing with pinning npm's trusted publisher to thenpm-publishenvironment when that gets configured.The npm scope
@metamask/*is deliberately unchanged, as are theMetaMask/*reusable actions — they are public and key offgithub.repository— and links to genuinely separate repositories such asMetaMask/coreandMetaMask/delegation-framework.Changes
repository.urlin the root manifest and propagaterepository,homepage, andbugsto every workspace viayarn constraints --fix; the private packages, which the constraint does not cover, are updated to match.analyse-codegatedall-jobs-complete, so every pull request would have failed on it. This also removes a duplicate run — the workflow declared its ownpush/pull_requesttriggers alongside theworkflow_callfrommain.yml.CODEOWNERSat a team that resolves. An unresolvable team matches nobody rather than erroring, so review was silently never requested.id-token: writeto the npm publish job and thepublish-releasecaller inmain.yml, withhold it from the pre-gate dry run, and drop the Slack notification, whose webhook and subteam are both unreachable from here.Testing
yarn constraintsandyarn changelog:validateare the real regression tests for the manifest and changelog rewrites — the latter regenerates every link block fromrepositoryand fails on any difference.actionlintcovers the workflow edits, andmain.yml's owncheck-workflowsjob runs it in CI.yarn buildand the full unit suite pass; the source edits are comment-only, so those are regression checks rather than targeted ones.The full suite failed once in
packages/kernel-ui/src/App.test.tsxand passed on re-run. That file is untouched by this branch and the test passes in isolation on bothmainand here, so it looks like a pre-existing flake under parallel load.🤖 Generated with Claude Code