Skip to content

docs: search_docs tool - #91

Merged
gregnr merged 1 commit into
mainfrom
docs/search-docs-tool
Jun 9, 2025
Merged

gregnr merged 1 commit into
mainfrom
docs/search-docs-tool

Conversation

@gregnr

@gregnr gregnr commented Jun 9, 2025

Copy link
Copy Markdown
Member

Adds missing search_docs tool to readme.

@gregnr
gregnr merged commit 9f7ae79 into main Jun 9, 2025
GQAdonis pushed a commit to skytok-net/supabase-mcp that referenced this pull request Aug 14, 2025
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).
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.

1 participant