Repository navigation
chore: regenerate management API types - #609
Merged
Merged
Conversation
Coverage Report for CI Build 45607819771Coverage remained the same at 98.356%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
4 tasks done
Rodriguespn
approved these changes
Nov 25, 2026
Rodriguespn
added a commit
that referenced
this pull request
Nov 26, 2026
Auto-opens the Management API types sync PR whenever `Check Management API Types` fails, and auto-approves + auto-merges it once `Tests` pass. Follows the same `supabase-oss` pattern team CLI uses in [bot-pr-auto-merge.yml](https://github.com/supabase/cli/blob/develop/.github/workflows/bot-pr-auto-merge.yml) and [CODEOWNERS](https://github.com/supabase/cli/blob/develop/.github/CODEOWNERS). - Triggers `sync-management-api-types.yml` on failed `Check Management API Types` `workflow_run` completions, serialized with a `sync-management-api-types` concurrency group. Existing `chore/regenerate-management-api-types` PRs are updated in place (or skipped as a no-op if unchanged). - Adds `@supabase-oss` alongside `@supabase/ai` in `.github/CODEOWNERS` only for the two generated `types.ts` files (`management-api/types.ts` and `management-api-v2/types.ts`). - Adds `auto-approve-management-api-types.yml`, triggered on `Tests` `workflow_run` success in `main`'s context (never checks out PR code). Validates same repo, `main` target, non-draft, `supabase-releaser[bot]`, exact `HEAD` SHA, and 1–2 `modified` files strictly within those two `types.ts` paths before approving via `AUTO_APPROVE_PR_PAT` and enabling/executing squash auto-merge. ```mermaid flowchart TD T1["PR fails Check Management API Types"] --> SYNC T2["Daily cron 06:00 UTC"] --> SYNC T3["Manual workflow_dispatch"] --> SYNC SYNC["sync-management-api-types.yml\n(runs on main, serialized by concurrency)"] --> OPEN{"PR already open on\nchore/regenerate-management-api-types?"} OPEN -->|No| PR["Opens PR as supabase-releaser[bot]"] OPEN -->|Yes, same spec diff| NOOP["Clean no-op\n(no push, no duplicate PR)"] OPEN -->|Yes, newer spec diff| PR2["Force-pushes updated commit\nto existing PR in place"] PR --> CI1["Code Quality (biome.yml)\nrequired on main"] PR --> CI2["Tests (tests.yml)\nbuild + typecheck + vitest + ui-test"] PR2 --> CI1 PR2 --> CI2 CI2 -->|fails: e.g. breaking OpenAPI change| STOP1["Stops: PR stays open,\nno approval, no merge"] CI2 -->|succeeds| AA["auto-approve-management-api-types.yml\n(runs on main, never checks out PR code)"] AA --> GATE{"Strict gates:\n• same repo + main target + non-draft\n• actor == sender == supabase-releaser[bot]\n• HEAD SHA matches Tests run\n• only 1-2 modified types.ts files (no renames)"} GATE -->|any check fails| STOP2["Aborts: no approval, no merge"] GATE -->|all pass| APP["supabase-oss approves exact HEAD SHA\n(satisfies CODEOWNERS on types.ts only)"] APP --> AM{"Repo allow_auto_merge?"} AM -->|false| HOLD["Approved only — human merges"] AM -->|true| MERGE["Squash-merges at exact HEAD SHA\n(immediately if CLEAN, or waits for Code Quality)"] ``` Repo prerequisites are already configured (`main`-restricted `auto-approve` environment with `AUTO_APPROVE_PR_PAT`, `supabase-oss` write access, `allow_auto_merge=true`). Verified with `actionlint` + `shellcheck` and by running the file-allowlist script against #609 and negative fixtures (extra file, rename, added file).
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.
Automatically generated by the Sync Management API Types workflow.
This regenerates the Management API types from the current v1 and v2 OpenAPI specs.