Skip to content
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

Repetitive reviews for the same issues #37

Closed
justinchuby opened this issue Sep 18, 2024 · 0 comments · Fixed by #38
Closed

Repetitive reviews for the same issues #37

justinchuby opened this issue Sep 18, 2024 · 0 comments · Fixed by #38

Comments

@justinchuby
Copy link

Repetitive reviews are created for the same diff when the workflow is triggered multiple times. This causes the PR to be flooded with comments. Would be good if only new diff comments are created.

parkerbxyz added a commit that referenced this issue Sep 18, 2024
Fixes #37

Prevent repetitive reviews for the same diff when the workflow is triggered multiple times.

* **Fetch existing review comments**: Add a function to fetch existing review comments using `octokit.pulls.listReviewComments`.
* **Check for duplicate comments**: Modify the logic to check for existing comments before creating new ones. Compare new comments with existing ones to avoid duplicates.
* **Update review creation**: Update `octokit.pulls.createReview` call to only include new comments if there are any.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/parkerbxyz/suggest-changes/issues/37?shareId=XXXX-XXXX-XXXX-XXXX).
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 a pull request may close this issue.

1 participant