-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip or delete PR diff comments when empty #4520
Conversation
📋 StatsFile sizes
Modules
View stats and visualisations on the review app Action run for aabe22d |
ea483d4
to
b5dead2
Compare
b5dead2
to
e391a29
Compare
e91caba
to
e391a29
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers for digging into solutions for the comments on that PR 😊
I think there's a mix of things in this PR and we may want to split it into two:
- Adding comments in a consistent order sounds fairly uncontroversial and could go on its own
- Skipping or deleting when empty could use a bigger discussion, as we may still want a "no diff to output" comment that would reassure us that the diff did actually run (and that there wasn't a bug despite the workflow completing OK, for example).
In terms of code, the steps taken look generally fine. I'd be keen to keep the <!--
and -->
wrapping the marker text inside the functions creating the comments (and now searching/deleting it), as it provides some safety that the marker won't be visible in the comment once posted.
09a0431
to
67e515b
Compare
@romaricpascal Thanks
☝️ Sounds good, let me know, I was happy with the noise at first but now they're everywhere 😱 I've only set |
5a54afd
to
ed74d5c
Compare
This change reduces comment noise for PRs but keeps the important two for GitHub releases: 1. JavaScript changes to GitHub release 2. Stylesheets changes to GitHub release They provide confirmation that the GitHub Action ran successfully
67e515b
to
aabe22d
Compare
We discussed this at dev catch up so I'll add a summary 🙌 Essentially it felt a shame to delete "No diff changes found" PR comments but sadly the GitHub REST API for issues doesn't support the hide comment feature. It's only found in the GitHub GraphQL API as “minimising as OUTDATED” Since we only added npm package diffs last week, we won't miss seeing empty comments So to move forward we'll determine which PR diff comments can be skipped (or deleted) when empty I've suggested we merge this PR which implements the following:
Then in future, for any skipped comments, can add a single combined summary in another PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's reduce the noise for now, and think about how to get some certainty that things have ran OK in a future PR. I'll create an issue to track that.
Thanks for updating our set up 😊 ⛵
This PR addresses some of the review comments in #4511 (review)
Skipping empty GitHub diff comments
We no longer post "No diff changes found." comments, except for:
This reduces comment noise for day-to-day PRs but keeps the important two for GitHub releases
Deleting outdated GitHub diff comments
What if a PR had a diff and a comment was added
But another push results in no diff, so we'd be left with an outdated comment that was already posted
With the comment now out of date, we now remove it via GitHub REST API
issues.deleteComment