Skip to content

Review feedback 30-day backfill #3

Review feedback 30-day backfill

Review feedback 30-day backfill #3

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 || github.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: Run review feedback 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()
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()
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