Skip to content

feat: Add allow-empty input to support intentionally empty commits#2

Merged
leifdreizler merged 2 commits intomainfrom
allow-empty
May 8, 2026
Merged

feat: Add allow-empty input to support intentionally empty commits#2
leifdreizler merged 2 commits intomainfrom
allow-empty

Conversation

@leifdreizler
Copy link
Copy Markdown

@leifdreizler leifdreizler commented May 8, 2026

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.

Also addresses grafana#114 by adding success-if-no-changes (and the new allow-empty) to the docs/README.tmpl usage examples.

End-to-end verification

Beyond the in-repo test-allow-empty job, the updated action was wired into a real downstream workflow (leifdreizler/test-grafana-GHA) and run side-by-side against the unmodified upstream:

  • Empty commit produced via this PRrunresulting commit
  • Upstream grafana/github-api-commit-action@v1.0.0 rejects the same no-changes inputrun

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>
@leifdreizler leifdreizler changed the title feat: add allow-empty input to support intentionally empty commits feat: Add allow-empty input to support intentionally empty commits May 8, 2026
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>
@leifdreizler leifdreizler merged commit 455b1aa into main May 8, 2026
27 checks passed
@leifdreizler leifdreizler deleted the allow-empty branch May 8, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant