Repository navigation
ci: grant pull-requests write to SDK compliance caller - #1611
Merged
Merged
Conversation
The reusable validate-sdk-compliance-dart workflow's check job now requests pull-requests: write to post the capability matrix drift comment. A called workflow's token cannot exceed the caller's grant, so the caller only granting contents: read made every run fail at startup. Grant pull-requests: write so the token can be passed down.
Contributor
|
Caution Review failedAn error occurred during the review process. Please try again later. 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 |
grdsdev
approved these changes
Jul 16, 2026
Vinzent03
pushed a commit
that referenced
this pull request
Jul 28, 2026
## What Adds `pull-requests: write` to the `SDK Compliance` workflow (both the top-level `permissions` and the `validate` job) so the reusable workflow it calls can run. ## Why Every PR run of `SDK Compliance` has failed with `startup_failure` since 2026-07-15. It is not caused by any individual PR. The workflow calls the `@main`-pinned reusable workflow `supabase/sdk/.github/workflows/validate-sdk-compliance-dart.yml`. In supabase/sdk #60 (commit `45dba43`), the reusable workflow's `check` job started requesting `pull-requests: write` so it can post the capability matrix drift comment. A called reusable workflow's `GITHUB_TOKEN` permissions can only be equal to or more restrictive than the caller's. This caller only granted `contents: read`, so the reusable workflow requesting a scope the caller does not have makes GitHub reject the run at compile time, before any job starts. Granting `pull-requests: write` in the caller lets the token be passed down so the drift comment step can post. ## Notes - The same fix is needed in the other SDK repos that consume this reusable workflow (e.g. supabase-js), which are failing the same way. - The drift check posts/updates a sticky PR comment; it is best-effort and swallows 403s on fork PRs.
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.
What
Adds
pull-requests: writeto theSDK Complianceworkflow (both the top-levelpermissionsand thevalidatejob) so the reusable workflow it calls can run.Why
Every PR run of
SDK Compliancehas failed withstartup_failuresince 2026-07-15. It is not caused by any individual PR.The workflow calls the
@main-pinned reusable workflowsupabase/sdk/.github/workflows/validate-sdk-compliance-dart.yml. In supabase/sdk #60 (commit45dba43), the reusable workflow'scheckjob started requestingpull-requests: writeso it can post the capability matrix drift comment.A called reusable workflow's
GITHUB_TOKENpermissions can only be equal to or more restrictive than the caller's. This caller only grantedcontents: read, so the reusable workflow requesting a scope the caller does not have makes GitHub reject the run at compile time, before any job starts.Granting
pull-requests: writein the caller lets the token be passed down so the drift comment step can post.Notes