Route reviewer publishing through PowerForge #5805
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: IX PR Babysit Monitor (PR + Submitted Review Signals) | |
| on: | |
| schedule: | |
| - cron: "23 * * * *" | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| pull_request_review: | |
| # GitHub often emits pull_request_review and pull_request_review_comment together. | |
| # Keep submitted reviews as the event-driven signal and avoid duplicate monitor runs. | |
| types: | |
| - submitted | |
| - edited | |
| workflow_dispatch: | |
| inputs: | |
| pr: | |
| description: "Optional PR number or URL to monitor (otherwise scans open PRs)" | |
| required: false | |
| default: "" | |
| max_prs: | |
| description: "Max open PRs to scan when pr is not provided" | |
| required: false | |
| default: "100" | |
| max_flaky_retries: | |
| description: "Retry budget classification ceiling for pr-watch snapshots" | |
| required: false | |
| default: "3" | |
| retry_failure_policy: | |
| description: "Retry planning mode: any or non-actionable-only" | |
| required: false | |
| default: "any" | |
| include_drafts: | |
| description: "Include draft PRs in scan mode" | |
| required: false | |
| default: false | |
| type: boolean | |
| approved_bots: | |
| description: "Comma-separated approved bot logins for source classification" | |
| required: false | |
| default: "intelligencex-review,intelligencex-review[bot],chatgpt-codex-connector[bot]" | |
| permissions: | |
| actions: read | |
| contents: read | |
| issues: read | |
| pull-requests: read | |
| env: | |
| PR_WATCH_STATE_DIR: artifacts/pr-watch | |
| PR_WATCH_SNAPSHOT_DIR: artifacts/pr-watch/snapshots | |
| PR_WATCH_SUMMARY_PATH: artifacts/pr-watch/ix-pr-watch-summary.md | |
| PR_WATCH_ROLLUP_PATH: artifacts/pr-watch/ix-pr-watch-rollup.json | |
| PR_WATCH_STATE_CACHE_PREFIX: ix-pr-watch-state-${{ github.repository }}-${{ github.ref_name }} | |
| PR_WATCH_STATE_CACHE_KEY: ix-pr-watch-state-${{ github.repository }}-${{ github.ref_name }}-${{ github.run_id }} | |
| jobs: | |
| monitor: | |
| # Security hardening: monitor runs on GitHub-hosted runners only. | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 | |
| with: | |
| dotnet-version: "8.0.x" | |
| - name: Restore pr-watch state cache | |
| uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ${{ env.PR_WATCH_STATE_DIR }}/ix-pr-watch-*.json | |
| key: ${{ env.PR_WATCH_STATE_CACHE_KEY }} | |
| restore-keys: | | |
| ${{ env.PR_WATCH_STATE_CACHE_PREFIX }}- | |
| - name: Build CLI once | |
| run: dotnet build IntelligenceX.Cli/IntelligenceX.Cli.csproj --framework net8.0 -c Release /m:1 | |
| - name: Run observe-mode PR watch monitor engine | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: > | |
| dotnet ./IntelligenceX.Cli/bin/Release/net8.0/IntelligenceX.Cli.dll | |
| todo pr-watch-monitor | |
| --repo "${{ github.repository }}" | |
| --pr "${{ github.event.inputs.pr }}" | |
| --max-prs "${{ github.event.inputs.max_prs }}" | |
| --max-flaky-retries "${{ github.event.inputs.max_flaky_retries }}" | |
| --retry-failure-policy "${{ github.event.inputs.retry_failure_policy }}" | |
| --include-drafts "${{ github.event.inputs.include_drafts }}" | |
| --approved-bots "${{ github.event.inputs.approved_bots }}" | |
| --run-link "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| --snapshot-dir "${PR_WATCH_SNAPSHOT_DIR}" | |
| --rollup-path "${PR_WATCH_ROLLUP_PATH}" | |
| --summary-path "${PR_WATCH_SUMMARY_PATH}" | |
| - name: Upload pr-watch artifacts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: ix-pr-watch | |
| path: artifacts/pr-watch | |
| - name: Save pr-watch state cache | |
| if: ${{ always() && hashFiles('artifacts/pr-watch/ix-pr-watch-*.json') != '' }} | |
| uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ${{ env.PR_WATCH_STATE_DIR }}/ix-pr-watch-*.json | |
| key: ${{ env.PR_WATCH_STATE_CACHE_KEY }} |