File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Run guarded ruff repair script
2+
3+ on :
4+ push :
5+ branches :
6+ - claude/inference-comparison-4vlt4q
7+ paths :
8+ - .github/workflows/run-ruff-repair-script.yml
9+ - scripts/apply_ruff_repairs.py
10+
11+ permissions :
12+ contents : write
13+
14+ jobs :
15+ repair :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Check out branch
19+ uses : actions/checkout@v4
20+ with :
21+ ref : claude/inference-comparison-4vlt4q
22+ fetch-depth : 0
23+
24+ - name : Run guarded repairs
25+ shell : bash
26+ run : |
27+ set +e
28+ mkdir -p diagnostics
29+ python scripts/apply_ruff_repairs.py > diagnostics/apply-ruff.log 2>&1
30+ status=$?
31+ echo "OVERALL EXIT CODE: ${status}" >> diagnostics/apply-ruff.log
32+ echo "${status}" > diagnostics/apply-ruff.status
33+ exit 0
34+
35+ - name : Commit result
36+ run : |
37+ git config user.name "github-actions[bot]"
38+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
39+ if [ "$(cat diagnostics/apply-ruff.status)" = "0" ]; then
40+ git rm .github/workflows/apply-ruff-repairs.yml
41+ git rm .github/workflows/run-ruff-repair-script.yml
42+ git rm scripts/apply_ruff_repairs.py
43+ git add src tests diagnostics/apply-ruff.log diagnostics/apply-ruff.status
44+ git commit -m "Apply guarded behavior-preserving ruff repairs"
45+ else
46+ git add diagnostics/apply-ruff.log diagnostics/apply-ruff.status
47+ git commit -m "Record guarded ruff repair failure"
48+ fi
49+ git push origin HEAD:claude/inference-comparison-4vlt4q
You can’t perform that action at this time.
0 commit comments