Review feedback 30-day backfill #5
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: Review feedback 30-day backfill | |
| on: | |
| schedule: | |
| - cron: "43 11 * * 0" | |
| workflow_dispatch: | |
| inputs: | |
| since_hours: | |
| description: "Merged PR lookback window" | |
| required: false | |
| default: "720" | |
| min_severity: | |
| description: "Minimum severity to report" | |
| required: false | |
| default: "high" | |
| pr_limit: | |
| description: "Maximum merged PRs to inspect" | |
| required: false | |
| default: "1000" | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: read | |
| jobs: | |
| backfill: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| GH_TOKEN: ${{ secrets.EVALOPS_REVIEW_GUARD_TOKEN }} | |
| SINCE_HOURS: ${{ inputs.since_hours || '720' }} | |
| MIN_SEVERITY: ${{ inputs.min_severity || 'high' }} | |
| PR_LIMIT: ${{ inputs.pr_limit || '1000' }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Require org review guard token | |
| run: | | |
| if [ -z "${GH_TOKEN}" ]; then | |
| echo "::error::Set secrets.EVALOPS_REVIEW_GUARD_TOKEN with org-wide PR read access before running the 30-day feedback backfill." | |
| exit 2 | |
| fi | |
| - name: Run review feedback backfill | |
| id: backfill | |
| run: | | |
| set +e | |
| ruby .github/scripts/sweep-recent-review-feedback.rb \ | |
| --owner evalops \ | |
| --since-hours "${SINCE_HOURS}" \ | |
| --pr-limit "${PR_LIMIT}" \ | |
| --min-severity "${MIN_SEVERITY}" \ | |
| --json-output review-feedback-30d-ledger.json \ | |
| --guardrail-backlog-output review-feedback-30d-guardrail-backlog.md \ | |
| --guardrail-backlog-json-output review-feedback-30d-guardrail-backlog.json \ | |
| --guardrail-lifecycle-json-output review-feedback-30d-guardrail-lifecycle.json \ | |
| --weekly-report-issue-repo evalops/.github \ | |
| > review-feedback-30d-summary.md | |
| status=$? | |
| cat review-feedback-30d-summary.md >> "${GITHUB_STEP_SUMMARY}" | |
| { | |
| echo "" | |
| cat review-feedback-30d-guardrail-backlog.md | |
| } >> "${GITHUB_STEP_SUMMARY}" | |
| if [ "${status}" -eq 0 ]; then | |
| exit 0 | |
| fi | |
| if [ "${status}" -eq 1 ]; then | |
| echo "::notice::30-day review feedback backfill found candidate guardrail classes" | |
| exit 0 | |
| fi | |
| exit "${status}" | |
| - name: Upload review feedback 30-day ledger | |
| if: ${{ always() && steps.backfill.outcome != 'skipped' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: review-feedback-30d-ledger | |
| path: | | |
| review-feedback-30d-summary.md | |
| review-feedback-30d-ledger.json | |
| if-no-files-found: error | |
| retention-days: 90 | |
| - name: Upload review feedback 30-day guardrail backlog | |
| if: ${{ always() && steps.backfill.outcome != 'skipped' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: review-feedback-30d-guardrail-backlog | |
| path: | | |
| review-feedback-30d-guardrail-backlog.md | |
| review-feedback-30d-guardrail-backlog.json | |
| review-feedback-30d-guardrail-lifecycle.json | |
| if-no-files-found: error | |
| retention-days: 90 |