ci: remove PR title check comment when check passes#850
Open
nielspardon wants to merge 1 commit into
Open
Conversation
Refactor the PR title check into a single github-script step that branches on the commitlint outcome. When the check passes, any previously posted comment is deleted; when it fails, the comment is posted (if not already present) and the job fails. The bot comment now carries a hidden marker so it can be found regardless of wording or whitespace, and the workflow declares pull-requests: write so it can delete comments. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bestbeforetoday
pushed a commit
to substrait-io/substrait-python
that referenced
this pull request
Jun 16, 2026
Ports substrait-io/substrait-java#850 to substrait-python. Previously the PR Title Check workflow posted an "ACTION NEEDED" comment when the PR title/description did not follow Conventional Commits, but never removed it once the title was fixed. This consolidates the comment logic into a single `github-script` step that branches on the commitlint outcome (using `continue-on-error: true` plus `core.setFailed(...)` to keep the check red on failure): - On pass: delete any previously posted comment. - On fail: post the comment if not already present. The bot comment is identified via a hidden `<!-- pr-title-check -->` marker rather than exact body matching, so cleanup survives wording or whitespace changes. The workflow now declares `permissions: pull-requests: write` so it can delete comments. The Python-specific `.commitlintrc.js` content (the dependabot `Bumps [...]` ignore rule) is preserved. Note: cleanup is marker-based, so it only applies to comments posted by this new version going forward. Pre-existing comments from the old workflow version won't be automatically removed. Co-authored-by: Claude Opus 4.8 (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.
Summary
The PR Title Check workflow posts an ACTION NEEDED comment when the PR title/description doesn't follow Conventional Commits, but it never removed that comment once the title was fixed and the check passed. This updates the workflow so the comment is deleted when the check passes.
Changes
failure()-only logic into a singlegithub-scriptstep that branches on the commitlint outcome (continue-on-error: true+core.setFailed(...)keeps the check red on failure).<!-- pr-title-check -->marker rather than exact body matching, so detection/cleanup survives wording or whitespace changes.permissions: pull-requests: writeso the workflow can delete comments.Notes
Cleanup is marker-based, so it applies to comments posted by the new version going forward; pre-existing comments from the old workflow won't be auto-removed.
🤖 Generated with Claude Code