fix(ci): skip Link job on fork PRs#4915
Conversation
The Link job requires SUPABASE_ACCESS_TOKEN and SUPABASE_PROJECT_ID secrets which are unavailable to fork PRs. Without this guard, the job always fails on external contributions, creating a misleading red CI status that distracts both contributors and reviewers. The if condition checks github.event.pull_request.head.repo.fork and skips the job entirely for fork PRs, showing it as 'skipped' instead of 'failed'. On pushes to develop and PRs from branches within the main repo, the job continues to run normally.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Cache: Disabled due to Reviews > Disable Cache setting Disabled knowledge base sources:
📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe pull request adds a conditional guard to the Link job in the GitHub Actions CI workflow. The condition Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Context for reviewers: longer-term consideration This PR is a targeted fix — skip the Link job on fork PRs where secrets are unavailable. It's worth noting the broader architectural questions here though. The Link job was introduced in #4505 (Nov 2025) as a side-item alongside the fsevents mock work. It runs the full The reliance on repo secrets (
None of this blocks merging the |
Summary
Skip the Link CI job on pull requests from forked repositories, where it always fails due to unavailable secrets.
Problem
The Link job requires
SUPABASE_ACCESS_TOKENandSUPABASE_PROJECT_IDrepository secrets to run./main linkagainst a real Supabase project. GitHub Actions does not expose repository secrets to workflows triggered by fork PRs (this is a deliberate security measure).As a result, every fork PR shows a persistent red Link failure in its CI checks. This is misleading for both contributors and reviewers — it creates the impression that something is broken when the PR's code is actually fine.
Fix
Add a single
ifcondition to the Link job:Behavior after this change:
developgithub.event.pull_requestis null, sohead.repo.forkis falsy)supabase/cliThis is the standard GitHub Actions pattern for guarding jobs that depend on repository secrets.