Skip to content

An AI-powered search engine with a generative UI

chore: guard against vendor provider PRs (#1105)

Yoshiki Miuraf3612ed56432
diff --git a/.github/workflows/close-search-provider-prs.yml b/.github/workflows/close-search-provider-prs.yml
new file mode 100644
index 00000000..0a5baa8c
--- /dev/null
+++ b/.github/workflows/close-search-provider-prs.yml
@@ -0,0 +1,31 @@
+name: Close Search Provider PRs
+
+on:
+ pull_request_target:
+ types: [opened, synchronize]
+ branches: [main]
+
+permissions:
+ pull-requests: write
+
+jobs:
+ close:
+ runs-on: ubuntu-latest
+ name: Close PRs that add a search provider
+ if: ${{ !contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association) }}
+
+ steps:
+ - name: Close if a provider class is added
+ env:
+ GH_TOKEN: ${{ github.token }}
+ REPO: ${{ github.repository }}
+ PR_NUMBER: ${{ github.event.pull_request.number }}
+ run: |
+ added=$(gh api --paginate "repos/$REPO/pulls/$PR_NUMBER/files" \
+ --jq '.[] | select(.status == "added" and (.filename | test("^lib/tools/search/providers/[^/]+$")) and ((.patch // "") | test("class \\w+ (extends BaseSearchProvider|implements SearchProvider)"))) | .filename')
+
+ if [ -z "$added" ]; then
+ exit 0
+ fi
+
+ gh pr close "$PR_NUMBER" --repo "$REPO" --comment "Thanks for the PR. We intentionally keep the set of built-in search providers small and don't accept new provider implementations, so this was closed automatically. See [Provider and Vendor Integrations](https://github.com/$REPO/blob/main/CONTRIBUTING.md#provider-and-vendor-integrations). If you think this was closed by mistake, please open an issue."
diff --git a/AGENTS.md b/AGENTS.md
index 39d8614f..3f95cc13 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -138,6 +138,10 @@ DATABASE_URL= # PostgreSQL connection string
- Run `bun run test:watch` for development with watch mode
- CI automatically runs `bun run test` to ensure all tests pass
+## Provider and Vendor Integrations
+
+Do not open PRs that add search or AI providers or vendor-specific integrations. See [CONTRIBUTING.md](CONTRIBUTING.md#provider-and-vendor-integrations).
+
## Pre-PR Requirements
Before creating a pull request, you MUST ensure all of the following checks pass:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c70c87a7..85faf7cc 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,6 +29,16 @@ By participating in this project, you are expected to uphold our [Code of Conduc
5. Push to your fork
6. Open a Pull Request
+### Provider and Vendor Integrations
+
+We intentionally keep the set of built-in providers small, and we do not accept PRs that:
+
+- add a new search or AI provider
+- add vendor-specific setup examples to the docs
+- add vendor-specific model IDs, ordering, or filtering to the core
+
+These PRs will be closed, and PRs that add a search provider are closed automatically. This is about maintenance surface, not any specific vendor.
+
### Commit Convention
We use conventional commits. Examples: