🚦 ci: Stop Auto-Indexing PR Branches in GitNexus Index (#13866)

This commit is contained in:
Danny Avila 2026-06-20 11:03:21 -04:00 committed by GitHub
parent 9dd0df9d61
commit ff81377573
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,12 +1,13 @@
name: GitNexus Index
on:
# PR branches are NOT auto-indexed — an embeddings run is too slow to
# spend on every PR push. Only main/dev are indexed automatically;
# individual PRs are indexed on demand via the /gitnexus command or a
# manual workflow_dispatch.
push:
branches: [main, dev]
paths-ignore: ['**.md', 'docs/**', 'LICENSE', '.github/**']
pull_request:
branches: [main, dev]
paths-ignore: ['**.md', 'docs/**', 'LICENSE', '.github/**']
workflow_dispatch:
inputs:
embeddings:
@ -50,15 +51,13 @@ jobs:
permissions:
contents: read
pull-requests: read # read changed files to decide whether embeddings are needed
# Push + dispatch run unconditionally. Native pull_request events
# are restricted to PRs authored by danny-avila only — this keeps
# automatic CI spend low on a repo with 200+ open PRs.
#
# Other contributors' PRs can still be indexed on demand:
# Push + dispatch run unconditionally. The pull_request trigger is
# disabled (see `on:` above), so this never runs automatically on a
# PR. PRs are indexed on demand instead:
# - /gitnexus index (PR comment command, contributor-gated)
# - workflow_dispatch (manual dispatch from Actions UI)
# Both bypass this filter because they arrive as workflow_dispatch,
# not pull_request.
# Both arrive as workflow_dispatch. The pull_request guard is kept as
# a safety net should the trigger ever be re-added.
if: |
github.event_name != 'pull_request' ||
github.event.pull_request.user.login == 'danny-avila'