Skip to content

ci: grant pull-requests write to SDK compliance caller - #1611

Merged
spydon merged 1 commit into
mainfrom
fix/sdk-compliance-pr-write-permission
Jul 17, 2026
Merged

spydon merged 1 commit into
mainfrom
fix/sdk-compliance-pr-write-permission

Conversation

@spydon

@spydon spydon commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

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.

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.
@spydon
spydon requested a review from a team as a code owner July 16, 2026 22:35
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@spydon
spydon merged commit 2c961c0 into main Jul 17, 2026
21 checks passed
@spydon
spydon deleted the fix/sdk-compliance-pr-write-permission branch July 17, 2026 06:36
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants