feat: don't leave a comment when there are no changes#414
Conversation
49347e9 to
849553c
Compare
|
@virgofx thoughts? 😎 |
|
Hey @leetrout , Thanks for this, the feature makes a lot of sense. A couple of thoughts: 1. Comment visibility: hidden vs. removedWould you be open to having the "no changes" comment still posted but as a hidden/minimized comment instead of fully suppressed? That way it shows up like: (Hidden > 'Resolved') mode
The reason I bring this up is there's an important idempotency edge case we need to preserve. On merge, we check for the presence of a The other reason - Someone accidently enables this and then is wondering where the comment is. At least here there's a fallback where it could be expanded manually but the out of box experience (which I believe you're trying to streamline) is still achieved? 2. Input namingI think the input name could be a bit more descriptive. Some alternatives:
I'm leaning toward What do you think? -- If you're onboard with the slight change, I'm happy to take this branch and modify to get finalized if that works? Alternatively, I can spin new branch off and close this to preserve yours. LMK |
849553c to
2d28d72
Compare
Per reviewer feedback on PR techpivot#414: - Post the comment but minimize it via GitHub GraphQL when there are no changes, preserving the PR_RELEASE_MARKER for idempotency checks - Rename input from disable-no-changes-comment to hide-no-changes-pr-comment and camelCase field from disableNoChangesComment to hideNoChangesPrComment Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@virgofx all makes sense to me! sorry for the late reply 😞 First: Yes a minimized comment is certainly a great improvement for our eyeballs rushing through PRs!! 😂 🙈 Second: Some more background: we went down this path because we assign our entire team to reviews via the @group tagging. So then for ~95% of our infra PRs we are sending extra emails to them generating more noise in the inboxes due to the (for us) unused comments and it clutters up the view with atlantis as well. I had the clanker true things up to your comments and catchup to main. The matrix of statistical weights also offered this opinion:
|
Adds `hide-no-changes-pr-comment` input (default: `false`). When enabled and there are no module changes and no legacy tags/releases to delete, the release plan comment is posted but minimized via GitHub GraphQL so it appears collapsed by default. Comments always post visibly when there are changes to report. Preserves the PR_RELEASE_MARKER for idempotency checks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2d28d72 to
35a947f
Compare
|
Is a PR comment the only way to track this state? This method seems brittle. I'm pretty sure it will also fail on high-traffic monorepos due to rate-limiting (a problem I've run into in the past with posting PR comments). Couldn't it guard against the target cases in other ways? GitHub Actions concurrency groups? Creating a cache entry? |

hide-no-changes-pr-commentinput (default:false) to hide the PR comment when there are nomodule changes and no legacy tags/releases pending deletion
PR_RELEASE_MARKERfor idempotency checks) but minimized via GitHub's GraphQL API so it appears collapsed by defaultBehavior
hide-no-changes-pr-comment: false(default)hide-no-changes-pr-comment: trueAI Disclosure
Used
claudefor these changes.