Skip to content

Commit 11b514a

Browse files
authored
Scope the nightly failure summary job and remove the unused todos workflow (project-chip#74359)
recent_fail_summary.yaml ran with `permissions: write-all`. The job needs only `actions: read`, since summarize_fail.py shells out to `gh run list` and `gh run view --log-failed`, plus `contents: write` for the step that commits docs/daily_pass_percentage.md to the daily_pass_percentage branch. Also pin its three action references by SHA and resolve its Python dependencies against scripts/setup/constraints.txt, which already pins pandas, pyyaml and tabulate; python-slugify is not in that file, so pin it inline. This matches how CI inputs are pinned elsewhere in the repo. todos.yaml has never run. Its `push` trigger was commented out the same day the file was added in January 2022, leaving it workflow_dispatch-only with no recorded runs since. Nothing references it, and Dependabot has been bumping actions/checkout in it for years. Remove it; TODO scanning can be reintroduced deliberately if it is wanted.
1 parent 107629d commit 11b514a

2 files changed

Lines changed: 9 additions & 43 deletions

File tree

.github/workflows/recent_fail_summary.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,27 @@ jobs:
2525
list_workflows:
2626
name: Summarize Recent Workflow Failures
2727
runs-on: ubuntu-latest
28-
permissions: write-all
28+
# actions:read summarize_fail.py runs `gh run list` / `gh run view --log-failed`
29+
# contents:write the Update Docs step commits to the daily_pass_percentage branch
30+
permissions:
31+
actions: read
32+
contents: write
2933
steps:
30-
- uses: actions/checkout@v7
31-
- run: pip install pandas python-slugify pyyaml tabulate
34+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
35+
- run: pip install -c scripts/setup/constraints.txt pandas pyyaml tabulate python-slugify==9.1.0
3236
- name: Run Summarization Script
3337
run: python scripts/tools/summarize_fail.py
3438
env:
3539
GH_TOKEN: ${{ github.token }}
3640
- name: Update Docs
37-
uses: test-room-7/action-update-file@v2
41+
uses: test-room-7/action-update-file@6b8249d09d5926fbae288c0bb640757f09ec7ce0 # v2
3842
with:
3943
file-path: docs/daily_pass_percentage.md
4044
commit-msg: Update daily pass percentage
4145
github-token: ${{ secrets.GITHUB_TOKEN }}
4246
branch: daily_pass_percentage
4347
- name: Upload Logs
44-
uses: actions/upload-artifact@v7
48+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
4549
with:
4650
name: workflow-fail-summary
4751
path: |

.github/workflows/todos.yaml

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)