feat(ci): add an empty-diff reusable that fails a no-op pull request - #111
Merged
Conversation
Eight no-op PRs landed on Glyndor/homebrew-tap and Glyndor/scoop-bucket before this gate existed: the work was already in main via squash-merge, the branch was recreated as -v2, and the second merge landed as a commit with zero files changed. CI is happy with that — a commit with no diff is valid git and a green GitHub Actions run, and only git show --stat flags it. The new reusable fails a pull request whose diff against its base ref is empty. It detects the base ref from the pull_request event payload, and needs fetch-depth: 0 on the checkout to see the base. This lands as advisory only. A required status check whose emitted name does not match blocks every pull request of the consumer, which is the phantom-check failure mode that bit apt and klyradb before. The reusable should be added as a thin caller in each of the four repositories that opened the no-op PRs, watched for a few weeks of green, and only then promoted to required in each repository's ruleset. Generated docs/reusables/empty-diff.md is committed alongside the workflow so docs-current stays green; the page is regenerated, not written, by scripts/render-reusable-docs.py. Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
Jaro-c
added a commit
to Glyndor/apt
that referenced
this pull request
Aug 11, 2026
Pin to the SHA of the merge commit (7eb2c69), before any vX.Y.Z tag of .Glyndor/.github exists, so this consumer is the one that proves the reusable. The check is advisory only for now: it runs on every pull request and emits a red status if the diff against main is empty, but the ruleset does not require it. Once the emitted name has stayed stable across a few weeks of green here and on the other three consumers (homebrew-tap, scoop-bucket, .github itself), I will promote it to a required status check in each repository's ruleset. The reusable itself was added in Glyndor/.github#111; the phantom-check failure mode that bit apt and klyradb before is the reason this lands advisory first rather than required. Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
Jaro-c
added a commit
to Glyndor/apt
that referenced
this pull request
Aug 11, 2026
Pin to the SHA of the merge commit (7eb2c69), before any vX.Y.Z tag of Glyndor/.github exists, so this consumer is the one that proves the reusable. The check is advisory only for now: it runs on every pull request and emits a red status if the diff against main is empty, but the ruleset does not require it. Once the emitted name has stayed stable across a few weeks of green here and on the other three consumers (homebrew-tap, scoop-bucket, .github itself), I will promote it to a required status check in each repository's ruleset. The reusable itself was added in Glyndor/.github#111; the phantom-check failure mode that bit apt and klyradb before is the reason this lands advisory first rather than required. Closes #88 Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
This was referenced Aug 11, 2026
Jaro-c
added a commit
to Glyndor/homebrew-tap
that referenced
this pull request
Aug 11, 2026
Pinned to the SHA that is the v1.14.0 tag of Glyndor/.github. The check is advisory only: it runs on every pull request and emits a red status if the diff against main is empty, but the ruleset does not require it. This tap is where the bug first showed up — eight no-op PRs landed here before any gate existed. The reusable was added in Glyndor/.github#111 and proven on Glyndor/apt#89 (pinned at the same SHA, ran green) before the tag was cut. Once the emitted check name has stayed stable across a few weeks of green here, I will promote it to a required status check in the ruleset. The phantom-check failure mode that bit apt and klyradb before is the reason the promotion should be deliberate, not done at first merge. Closes #53 Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
This was referenced Aug 11, 2026
Jaro-c
added a commit
to Glyndor/scoop-bucket
that referenced
this pull request
Aug 11, 2026
Pinned to the SHA that is the v1.14.0 tag of Glyndor/.github. The check is advisory only: it runs on every pull request and emits a red status if the diff against main is empty, but the ruleset does not require it. The sibling tap (Glyndor/homebrew-tap) is where eight no-op PRs landed before any gate existed. The same shape lives here, so the same gate applies. The reusable was added in Glyndor/.github#111 and proven on Glyndor/apt#89 (pinned at the same SHA, ran green) before the tag was cut. Once the emitted check name has stayed stable across a few weeks of green here, I will promote it to a required status check in the ruleset. The phantom-check failure mode that bit apt and klyradb before is the reason the promotion should be deliberate, not done at first merge. Closes #45 Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
Jaro-c
added a commit
that referenced
this pull request
Aug 11, 2026
Pinned to the SHA that is the v1.14.0 tag of this repository. The check is advisory only: it runs on every pull request and emits a red status if the diff against main is empty, but the ruleset does not require it. This repository is the fourth and final consumer to adopt the gate that catches no-op PRs — the same shape that bit Glyndor/homebrew-tap and Glyndor/scoop-bucket before the reusable existed in #111. Proven on Glyndor/apt#89, Glyndor/homebrew-tap#54 and Glyndor/scoop-bucket#46 (pinned at the same SHA, ran green) before the v1.14.0 tag was cut. Once the emitted check name has stayed stable across a few weeks of green here and across the other consumers, I will promote it to a required status check in each repository's ruleset. Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Eight no-op PRs landed on Glyndor/homebrew-tap and Glyndor/scoop-bucket before any gate existed: the work was already in main via squash-merge, the branch was recreated as -v2, and the second merge landed as a commit with zero files changed. CI is happy with that — a commit with no diff is valid git and a green GitHub Actions run, and only git show --stat flags it.
I am adding a reusable in .github/workflows/empty-diff.yml that fails a pull request whose diff against its base ref is empty. The reusable detects the base ref from the pull_request event payload and needs fetch-depth: 0 on the checkout to see the base.
This PR lands as advisory only. A required status check whose emitted name does not match blocks every pull request of the consumer, which is the phantom-check failure mode that bit apt and klyradb before. The reusable should be added as a thin caller in each of the four repositories that opened the no-op PRs, watched for a few weeks of green, and only then promoted to required in each repository's ruleset.
Generated docs/reusables/empty-diff.md is committed alongside the workflow so docs-current stays green; the page is regenerated, not written, by scripts/render-reusable-docs.py.