Skip to content

Commit 9cc25d3

Browse files
committed
Remove redundant inflight-PR check; processed.txt is sole source of truth
1 parent 0a4a99b commit 9cc25d3

2 files changed

Lines changed: 12 additions & 24 deletions

File tree

.github/workflows/module-cleanup.lock.yml

Lines changed: 6 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/module-cleanup.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,16 @@ jobs:
122122
MEMORY_BRANCH: memory/module-cleanup
123123
run: |
124124
set -euo pipefail
125-
# processed.txt lives at the root of the memory branch.
125+
# processed.txt lives at the root of the memory branch. The
126+
# finalize job appends each attempted module to processed.txt
127+
# before doing anything else, so this is the sole source of
128+
# truth for what's already been picked - including modules
129+
# currently sitting on the wip branch or in inflight batch PRs.
126130
processed=""
127131
if git fetch origin "$MEMORY_BRANCH" --depth=1 2>/dev/null; then
128132
processed=$(git show "origin/$MEMORY_BRANCH:processed.txt" 2>/dev/null || true)
129133
fi
130-
# Also exclude shorts already in inflight module-cleanup PRs.
131-
# Each module corresponds to one commit on the PR branch with subject
132-
# "Cleanup for <module>", so commit subjects are the source of truth.
133-
# Once a PR merges, those shorts also exist in processed.txt so they
134-
# won't be re-picked.
135-
inflight=$(gh pr list --repo "$GITHUB_REPOSITORY" \
136-
--label "module cleanup" --state open \
137-
--json commits --jq '.[].commits[].messageHeadline' \
138-
| sed -n 's/^Cleanup for //p' || true)
139-
export REVIEW_PROGRESS="$(printf '%s\n%s\n' "$processed" "$inflight" \
140-
| grep -v '^$' | sort -u)"
134+
export REVIEW_PROGRESS="$(printf '%s\n' "$processed" | grep -v '^$' | sort -u)"
141135
python .github/scripts/module-cleanup/build-cleanup-matrix.py
142136
143137
finalize:

0 commit comments

Comments
 (0)