From 373d08698e2e0e64ae17843c6c34cc4f791a4af2 Mon Sep 17 00:00:00 2001 From: Nate Barbettini Date: Mon, 5 Oct 2026 07:22:42 -0700 Subject: [PATCH] fix(ci): open the traceability refresh PR when only merged PRs exist `gh pr view ` also resolves to closed/merged PRs, so once #292 (head `traceability-refresh`) merged, every scheduled run found it and skipped `gh pr create`. Only skip creation when an open PR exists. Fixes #543 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/traceability.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/traceability.yml b/.github/workflows/traceability.yml index 31951057..6302d35a 100644 --- a/.github/workflows/traceability.yml +++ b/.github/workflows/traceability.yml @@ -124,7 +124,9 @@ jobs: git add src/seps/traceability.json git commit -m "chore: refresh SEP traceability manifest ($SDK_REF)" git push --force origin "$branch" - gh pr view "$branch" >/dev/null 2>&1 || gh pr create \ + # Only an OPEN PR counts: `gh pr view ` also matches merged/closed + # ones, which would skip creation forever after the first merge. + [ "$(gh pr list --head "$branch" --state open --json number --jq length)" -gt 0 ] || gh pr create \ --head "$branch" \ --title 'chore: refresh SEP traceability manifest' \ --body 'Automated refresh from a conformance run against the reference SDK. Review the coverage diff before merging.'