feat: Add allow-empty input to support intentionally empty commits#2
Merged
leifdreizler merged 2 commits intomainfrom May 8, 2026
Merged
feat: Add allow-empty input to support intentionally empty commits#2leifdreizler merged 2 commits intomainfrom
allow-empty input to support intentionally empty commits#2leifdreizler merged 2 commits intomainfrom
Conversation
When allow-empty is true, the no-changes guard falls through to the existing empty-array placeholder logic and the GraphQL mutation runs, producing a commit whose tree equals its parent's. allow-empty supersedes success-if-no-changes, which is documented in both inputs' descriptions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
allow-empty input to support intentionally empty commits
Closes the docs gap noted in grafana#114 for success-if-no-changes and documents the new allow-empty input in the same step. allow-empty is listed first in the examples since it supersedes success-if-no-changes, which makes the cross-reference in the success-if-no-changes comment read naturally. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
When
allow-emptyis true, the no-changes guard falls through to the existing empty-array placeholder logic and the GraphQL mutation runs, producing a commit whose tree equals its parent's.allow-emptysupersedessuccess-if-no-changes, which is documented in both inputs' descriptions.Also addresses grafana#114 by adding
success-if-no-changes(and the newallow-empty) to thedocs/README.tmplusage examples.End-to-end verification
Beyond the in-repo
test-allow-emptyjob, the updated action was wired into a real downstream workflow (leifdreizler/test-grafana-GHA) and run side-by-side against the unmodified upstream:grafana/github-api-commit-action@v1.0.0rejects the same no-changes input — run