feat: update existing PR summary comment instead of creating new ones#7848
Open
joshjohanning wants to merge 1 commit into
Open
Conversation
1 task
f80c30a to
180b738
Compare
When ENABLE_GITHUB_PULL_REQUEST_SUMMARY_COMMENT is enabled, super-linter now searches for an existing summary comment (identified by an HTML marker) and updates it in place, rather than creating a new comment on every push. This reduces comment noise on pull requests with multiple commits. The implementation: identify super-linter summary comments - Lists existing PR comments and finds any with the marker - Updates the existing comment via PATCH if found, or creates a new one - Refactors CallGitHubApi to accept an optional HTTP method parameter (backwards-compatible, defaults to POST) Closes: super-linter#7458
180b738 to
e1ee0a6
Compare
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.
When
ENABLE_GITHUB_PULL_REQUEST_SUMMARY_COMMENTis enabled (it is by default?), super-linter now searches for an existing summary comment (identified by an HTML marker) and updates it in place, rather than creating a new comment on every push. This reduces comment noise / spamminess on pull requests with multiple subsequent pushes.The implementation:
identify super-linter summary comments
Closes: #7458
I verified that this new logic works in
Readiness checklist
In order to have this pull request merged, complete the following tasks.
Pull request author tasks
Conventional Commit v1.0.0 spec.
upgrade guide.
Fix #ISSUE_NUMBERorClose #ISSUE_NUMBERtext to the description ofthe pull request.
Super-linter maintainer tasks
breakingif this change breaks compatibility with the previousreleased version.
automation,bug,documentation,enhancement,infrastructure.with the version that release-please proposes in the
preview-release-notesCI job.