Skip to content

ci(empty-diff): move the pull-request-only guard inside the reusable - #114

Merged
Jaro-c merged 2 commits into
mainfrom
ci/guard-empty-diff-reusable
Aug 11, 2026
Merged

ci(empty-diff): move the pull-request-only guard inside the reusable#114
Jaro-c merged 2 commits into
mainfrom
ci/guard-empty-diff-reusable

Conversation

@Jaro-c

@Jaro-c Jaro-c commented Aug 11, 2026

Copy link
Copy Markdown
Member

The four current callers each carry their own if: github.event_name == 'pull_request' on the job, which is the correct shape inside a caller workflow. Moving the same guard into the reusable itself means a future consumer does not have to relearn the lesson — they cannot call this reusable on push and have it fail closed on a missing base ref, because the inner job is skipped before the script runs.

Behaviour for the four callers today is unchanged: their caller-side if: short-circuits first, and the inner guard evaluates identically in the runs where the outer would have been omitted. I am leaving the four caller-side lines in place for now as a defensive backstop; cleanup is a follow-up after v1.14.1 has been green for a while.

Jaro-c added 2 commits August 11, 2026 13:42
The four current callers each carry their own
`if: github.event_name == 'pull_request'` on the job, which is the
correct shape inside a caller workflow. Moving the same guard into the
reusable itself means a future consumer does not have to relearn the
lesson — they cannot call this reusable on push and have it fail closed
on a missing base ref, because the inner job is skipped before the
script runs.

Behaviour for the four callers today is unchanged: their caller-side
`if:` short-circuits first, and the inner guard evaluates identically
in the runs where the outer would have been omitted. I am leaving the
four caller-side lines in place for now as a defensive backstop; cleanup
is a follow-up after v1.14.1 has been green for a while.

Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
The reusable now carries `if: github.event_name == 'pull_request'` on
its job, and the docs page notes that the emitted check is conditional.
The README's table also picked up the conditional-check column count, so
both files need to land at the same time as the workflow change; running
`scripts/render-reusable-docs.py` and committing the result is what
the CI check 'docs match the workflows' expects.

Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
@Jaro-c
Jaro-c merged commit c958978 into main Aug 11, 2026
7 checks passed
@Jaro-c
Jaro-c deleted the ci/guard-empty-diff-reusable branch August 11, 2026 18:45
Jaro-c added a commit that referenced this pull request Aug 11, 2026
Replaces the v1.14.0 SHA with the merge commit of `ci(empty-diff): move
the pull-request event guard inside the reusable` (#114), tagged as
v1.14.1. This repository's caller-side `if:` short-circuits first on
push, so observable CI here does not change; the bump is bookkeeping so
the four callers point at the same SHA instead of three repos being one
commit behind.

Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant