ci: skip check-skills review job on forks - #1989
Conversation
The review job pushes a branch and opens a pull request using `contents: write` and `pull-requests: write`. It is gated only on the event name, so it also runs in forks, where it opens a "Review intent skills" PR against the fork owner's own default branch. Every other workflow that writes to the repository already guards on `github.repository == 'toss/suspensive'` (release.yml, graph.yml, broken-link-checker.yml). Apply the same guard here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WeNzSeeWC9CBPNfhpi88cE
People can be co-author:
|
|
@Archibald1948 is attempting to deploy a commit to the Toss Team on Vercel. A member of the Team first needs to authorize it. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1989 +/- ##
=======================================
Coverage 93.22% 93.22%
=======================================
Files 42 42
Lines 664 664
Branches 163 163
=======================================
Hits 619 619
Misses 42 42
Partials 3 3
🚀 New features to boost your workflow:
|
|
Please review it. Please close it if it overkills. |
Overview
The
reviewjob incheck-skills.ymlis gated only on the event name:Its triggers are
pushtomain,release: published, andworkflow_dispatch— all of which fire in forks too. The job holdscontents: writeandpull-requests: write, and its last step pushes askills/review-*branch and opens a PR againstgithub.event.repository.default_branch. In a fork, that default branch is the fork owner's ownmain.So every contributor who forks this repository eventually gets an unsolicited "Review intent skills" PR sitting in their fork, addressed to a maintainer audience that does not exist there.
What happens in a fork
toss/suspensivegithub.repositorytoss/suspensive<user>/suspensivetoss/suspensive:main<user>/suspensive:mainThe PR body asks the reader to resolve skill version drift and lists ~19
stale-skillsignals plus a long agent prompt — all of it meaningless in a fork, since the fork owner is not the one who publishes@suspensive/*skills.To be clear, this is not a permissions problem: the fork owner is merging into their own repository, which is exactly what owning a fork means, and it has no effect on
toss/suspensive. It is repository noise, not a security issue.Change
Add the repository guard this repo already uses everywhere else that writes:
The same guard is already present in
release.yml:12,graph.yml:19,graph.yml:36, andbroken-link-checker.yml:10.check-skills.ymlis the only write-capable workflow missing it.The sibling
validatejob is intentionally left alone: it ispull_request-only, read-only, and running it in forks is useful, since it validates a contributor's own PR before they send it here.Note for maintainers
This file carries an
intent-workflow-version: 4header and says it is generated byintent setup. If that template is regenerated, this guard will be dropped again, so the same change may be worth making upstream in@tanstack/intent's workflow template rather than only here.PR Checklist
No tests or docs apply: this is a one-line CI trigger guard.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WeNzSeeWC9CBPNfhpi88cE