Skip to content

Introduce comment metadata and fingerprint for identifying existing posted comments #1792

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

Merged
merged 8 commits into from
Jun 22, 2024

Conversation

haya14busa
Copy link
Member

@haya14busa haya14busa commented Jun 17, 2024

Introduce metadata comment and fingerprint to github-pr-review reporter

Now reviwedog include metadata as HTML comment for github-pr-review
reporter.

We can now use calculated fingerprint to identify existing posted comments.

It resolves the problem w.r.t. related location feature.
Since reviewdog include the latest SHA in body of comment for relate
location feature, comparing comment body cannot be used for identifying
existing comments and it leads to post duplicate comments.
We can avoid this problem with fingerprint check.

  • Updated Unreleased section in CHANGELOG or it's not notable changes.

@@ -9,13 +9,13 @@ import (
"github.com/reviewdog/reviewdog/proto/rdf"
)

// `path` to `position`(Lnum for new file) to comment `body`s
// `path` to `position`(Lnum for new file) to comment `body` or `finterprint`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint-circleci] reported by reviewdog 🐶
comment on exported type PostedComments should be of the form "PostedComments ..." (with optional leading article)

@@ -9,13 +9,13 @@
"github.com/reviewdog/reviewdog/proto/rdf"
)

// `path` to `position`(Lnum for new file) to comment `body`s
// `path` to `position`(Lnum for new file) to comment `body` or `finterprint`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint-pr-review] reported by reviewdog 🐶
comment on exported type PostedComments should be of the form "PostedComments ..." (with optional leading article)

@haya14busa haya14busa marked this pull request as ready for review June 18, 2024 13:04
@haya14busa haya14busa requested a review from shogo82148 June 18, 2024 13:04
haya14busa and others added 8 commits June 18, 2024 22:08
Now reviwedog include metadata as HTML comment for github-pr-review
reporter.

We can now use calculated fingerprint to identify existing posted comments.

It resolves the problem w.r.t. related location feature.
Since reviewdog include the latest SHA in body of comment for relate
location feature, comparing comment body cannot be used for identifying
existing comments and it leads to post duplicate comments.
We can avoid this problem with fingerprint check.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants