Merge Executor #1010
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: Merge Executor | |
| on: | |
| schedule: | |
| - cron: '47 * * * *' | |
| workflow_dispatch: | |
| inputs: | |
| lookback_hours: | |
| description: Lookback window in hours for recently updated ready-to-merge PRs | |
| required: false | |
| default: '72' | |
| max_prs: | |
| description: Maximum number of PRs to merge in a single run | |
| required: false | |
| default: '5' | |
| lease_ttl_minutes: | |
| description: Reviewer lease TTL in minutes for final revalidation | |
| required: false | |
| default: '45' | |
| agent_id: | |
| description: Agent identity to write into metadata | |
| required: false | |
| default: merge-executor | |
| merge_method: | |
| description: GitHub merge method (merge, squash, rebase) | |
| required: false | |
| default: squash | |
| concurrency: | |
| group: merge-executor | |
| cancel-in-progress: false | |
| jobs: | |
| merge-executor: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| checks: read | |
| statuses: read | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Execute final agent merge | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| MERGE_EXECUTOR_LOOKBACK_HOURS: ${{ github.event.inputs.lookback_hours || '72' }} | |
| MERGE_EXECUTOR_MAX_PRS: ${{ github.event.inputs.max_prs || '5' }} | |
| MERGE_EXECUTOR_LEASE_TTL_MINUTES: ${{ github.event.inputs.lease_ttl_minutes || '45' }} | |
| MERGE_EXECUTOR_AGENT_ID: ${{ github.event.inputs.agent_id || 'merge-executor' }} | |
| MERGE_EXECUTOR_METHOD: ${{ github.event.inputs.merge_method || 'squash' }} | |
| run: npm run agent:merge-executor |