Skip to content

ci: remove PR title check comment when check passes#172

Open
nielspardon wants to merge 1 commit into
substrait-io:mainfrom
nielspardon:ci/pr-title-remove-comment-on-pass
Open

ci: remove PR title check comment when check passes#172
nielspardon wants to merge 1 commit into
substrait-io:mainfrom
nielspardon:ci/pr-title-remove-comment-on-pass

Conversation

@nielspardon

Copy link
Copy Markdown
Member

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.

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.

Consolidate the comment logic into a single github-script step that
branches on the commitlint outcome (using continue-on-error 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 so cleanup survives wording or
whitespace changes. Declare pull-requests: write so the workflow can
delete comments.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tokoko

tokoko commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

looks good, but just wondering.. what's the point of the comment in the first place? isn't red check in checks section enough?

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.

2 participants