Commit 53d9632
ci: remove PR title check comment when check passes (#172)
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>1 parent 5acd539 commit 53d9632
1 file changed
Lines changed: 46 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | | - | |
35 | | - | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
39 | 51 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
43 | 56 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
51 | | - | |
| 61 | + | |
52 | 62 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
57 | 73 | | |
| 74 | + | |
58 | 75 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
0 commit comments