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

Show all review comments together in a thread under the main review message. #8

Open
BURG3R5 opened this issue Dec 19, 2021 · 2 comments
Labels
new feature Feature request

Comments

@BURG3R5
Copy link
Owner

BURG3R5 commented Dec 19, 2021

Multiple messages for a single review is annoying.

@BURG3R5 BURG3R5 added the enhancement Improvements in a feature label Dec 19, 2021
@BURG3R5 BURG3R5 self-assigned this Dec 19, 2021
@BURG3R5
Copy link
Owner Author

BURG3R5 commented Dec 19, 2021

Two possible ways of doing this:

  1. Store incoming pull_request_review_comment events till the next pull_request_review event.
  2. Disregard incoming pull_request_review_comment events. Whenever a pull_request_review.changes_requested event is thrown, hit the comments endpoint to fetch all associated comments right then.

PS: PR comments other than review comments also need to be handled.

@BURG3R5
Copy link
Owner Author

BURG3R5 commented Jan 2, 2022

Further research in the two methods gave the following insight:

  1. In the first method, we can match json['comment']['pull_request_review_id'] to json['review']['id'] to confirm the ownership. This will not require any token, but will require storage.
  2. In the second method, sending a GET request to the review event's json['pull_request']['review_comments_url'] will give list of comments associated with that review. This will not require any storage, but will require a OAuth token, probably with read access to the org.

PS: Extracting the "PR comments other than review comments" thing to another issue.

@BURG3R5 BURG3R5 added new feature Feature request and removed enhancement Improvements in a feature labels Jan 3, 2022
@BURG3R5 BURG3R5 removed their assignment Jul 23, 2022
@BURG3R5 BURG3R5 added this to the v2 milestone Jul 23, 2022
@BURG3R5 BURG3R5 removed this from the v2.0.0 milestone Nov 27, 2022
@BURG3R5 BURG3R5 added this to Selene Nov 27, 2022
@BURG3R5 BURG3R5 moved this to Todo in Selene Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Feature request
Projects
Status: Todo
Development

No branches or pull requests

2 participants