Repository navigation
Skip pull requests from forks and stop rewriting the SDLC labels - #14
Conversation
Pull requests from forks get a read-only token and no secrets, so the label step failed with a 403 and Claude could not classify them. The labels already exist, and adding a label creates it when missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
SDLC label: |
Existing labels keep their color and description, so the step only reads them and needs no write access when the labels exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Fixes simpleanalytics/dashboard#1121
Every pull request from a fork failed
pull-request / sdlc-label, for example wordpress-plugin#64 (run).Ensure SDLC labelsstep withCreate missing SDLC labels. The old step rewrote the color and description of both labels on every run, and that rewrite returned the 403 on fork pull requests. The new step only reads the labels and creates one with its color and description when the repository does not have it yet.ANTHROPIC_API_KEYand a read-only token, so even without the 403 the Claude step would fail, and labeling, commenting, and requesting reviewers would return 403 too. GitHub reports a skipped job as passing.change: needs review.Pull requests from branches in the same repository run as before, except that existing labels are no longer rewritten.
Security implications
Tokens, secrets, and permissions are unchanged. Fork pull requests no longer get an automatic label or review request, so a maintainer sets those by hand.
Testing
node --test test/*.mjs: 38 tests pass. The trigger test now coversopenedandlabeledfork pull requests and fails against the workflow onmain. A new test covers creating a missing label, leaving an existing one alone, and failing on other errors.actionlint1.7.12 passes forpull-request.ymlandpull-request-checks.yml;git diff --checkpasses.sdlc-labelis skipped.Summary by CodeRabbit
Workflow Updates
Documentation