Skip to content

Commit 6f3555c

Browse files
committed
docs(designs): drop paths: filter from semver-gate workflow
Per review on PR #9057: a workflow that uses on.pull_request.paths: to fire only on relevant changes cannot also be a required branch- protection check. When paths don't match, the workflow doesn't run, no status posts, and branch protection treats the required check as missing/pending — blocking the PR. check_semver_bump.py already self-gates (returns exit 0 when no expected.*.yaml files changed), so dropping the paths filter and running unconditionally is the canonical fix for the "skipped but required check" pitfall. The script does the gating; the workflow just runs it.
1 parent fa61962 commit 6f3555c

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

designs/golden_templates_and_semver_check.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,18 +254,25 @@ can never diverge.
254254
### The semver gate
255255

256256
Tiny standalone GitHub workflow at
257-
`.github/workflows/golden-semver-gate.yml`. Fires only when corpus pins or
258-
the version file change:
257+
`.github/workflows/golden-semver-gate.yml`. Runs on every PR; the script
258+
itself returns exit 0 when no corpus pins changed, so it's cheap to run
259+
unconditionally and posts a definitive status on every PR (which lets
260+
branch protection mark it as a required check without blocking
261+
unrelated PRs):
259262

260263
```yaml
261264
on:
262265
pull_request:
263266
branches: [develop, "feat/*", "feat-*"]
264-
paths:
265-
- "tests/golden/templates/**/expected.*.yaml"
266-
- "samcli/__init__.py"
267267
```
268268

269+
The workflow does *not* use `on.pull_request.paths:` filtering. Path
270+
filtering at the trigger level skips the workflow entirely on PRs that
271+
touch no matching path — no status posts, and a required check that
272+
never reports gets treated by branch protection as missing/pending.
273+
Self-gating in the script (return 0 when there are no relevant changes)
274+
is the simpler fix and keeps the check eligible to be required.
275+
269276
`check_semver_bump.py` rules:
270277

271278
1. Diff merge base vs HEAD; collect changes to

0 commit comments

Comments
 (0)