Pipeline Status Sync #563
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
| name: Pipeline Status Sync | |
| # Sync pipeline/* stage and blocker labels on open internal PRs. | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.github/scripts/merge-gate.js' | |
| - '.github/scripts/merge-gate-selftest.js' | |
| - '.github/scripts/pipeline-status.js' | |
| - '.github/workflows/claude-merge-gate.yml' | |
| - '.github/workflows/pipeline-status-sync.yml' | |
| - '.github/workflows/merge-conflict-claude.yml' | |
| - '.github/workflows/claude.yml' | |
| schedule: | |
| - cron: '*/10 * * * *' | |
| workflow_dispatch: | |
| permissions: | |
| pull-requests: read | |
| issues: write | |
| actions: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Sync pipeline labels on open PRs | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GH_TOKEN }} | |
| script: | | |
| const path = require('path'); | |
| const ps = require(path.join(process.env.GITHUB_WORKSPACE, '.github/scripts/pipeline-status.js')); | |
| await ps.syncOpenPullRequests( | |
| github, context.repo.owner, context.repo.repo, | |
| { maxPrs: 50, dispatchMergeGate: true, maxGateDispatches: 3 }, core | |
| ); |