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

Inclusion of commit comments in the JSON response for pull_request #515

Closed
harshalmittal4 opened this issue Apr 18, 2019 · 9 comments
Closed

Comments

@harshalmittal4
Copy link
Contributor

harshalmittal4 commented Apr 18, 2019

Following the discussion, this issue is about including the commit messages to the JSON response for pull_request.

https://api.github.com/repos/chaoss/wg-gmd/pulls/12/commits provides all the fields that can be included in commits_data section of the response. Currently, it contains only the commit hash. Along with the hash, commit message and author_data can also be included in commits_data in the response.

Are there any other field than these 3 that might be useful to have in the response, @valeriocos @jgbarah @aswanipranjal, please share your views,
Thanks!

@valeriocos
Copy link
Member

I would start by adding only the comments since commit message, author and committer are already retrieved via the Git backend.

Thanks @harshalmittal4

@harshalmittal4
Copy link
Contributor Author

I would start by adding only the comments since commit message, author and committer are already retrieved via the Git backend.

Thanks for the reply @valeriocos, but this^ appears confusing.

Here is what I understand :

  1. issue comments (= regular comments, via https://api.github.com/repos/chaoss/wg-gmd/issues/12/comments)
  2. review comments (or line comments, via https://api.github.com/repos/chaoss/wg-gmd/pulls/12/comments)
  3. reviews (comments on the PR other then regular comments, via https://api.github.com/repos/chaoss/wg-gmd/pulls/12/reviews)
  4. commit message (via https://api.github.com/repos/chaoss/wg-gmd/pulls/12/commits)

We are discussing here solely for what is returned by perceval when --category pull_request is used.
As discussed earlier, (1) need not be included , (2) are already present, (3) is good to have, but is taken up by @Polaris000, and (4) to be done by me 🙂

I thought I needed to include the information about all the commits present in the PR (specially the commit message and the commit author). @valeriocos where am I wrong, Please correct me, thanks a lot!

@valeriocos
Copy link
Member

Sorry for not being clear @harshalmittal4 :)

Point 4. should focus on collecting the commit comments, which may be left during a code review. This point was discussed here: chaoss/wg-evolution#81 (comment)

For this iteration I'd say that it's better to focus only on commit comments. The remaining info about commits is already available via the Git backend.

Let me know if this is clear now, thanks!

@harshalmittal4
Copy link
Contributor Author

Point 4. should focus on collecting the commit comments, which may be left during a code review.

Hey @valeriocos, are these the line comments (mentioned in Point (2) above) you are talking about ? They are already there in the response.

@valeriocos
Copy link
Member

point 2. is about review comments, which are different from point 4 (please see the endpoints calls).
If you open https://api.github.com/repos/chaoss/wg-gmd/pulls/12/commits, you will see that it contains:
comments_url": "https://api.github.com/repos/chaoss/wg-gmd/commits/df277ff9269cd26e907f0c4b4fb5b08b4a9a3c8b/comments. There you will find the comments for that given commit.

@harshalmittal4
Copy link
Contributor Author

harshalmittal4 commented Apr 19, 2019

Thanks @valeriocos for the nice explanation, got it 😅

I made the additions in the code for this, but during execution it runs into an error saying perceval.errors.ArchiveError: data storage error; cause: duplicated entry. I will try figuring it out but would be delayed slightly since I am a bit occupied at present with semester exams approaching. Would make the PR once it is resolved, or could make it now in the current state if you can have a look.

@valeriocos
Copy link
Member

@harshalmittal4 thank you, please submit the PR so we can have a look at it :)

@sduenas
Copy link
Member

sduenas commented May 9, 2019

As we commented in #518, this is no longer supported. It's supported only for commits. I'm gonna close this issue for that reason.

A possible solution to have this feature would be to have a category commit, that will use the API for commits and include this within it. Feel free to work on it.

@sduenas sduenas closed this as completed May 9, 2019
@valeriocos
Copy link
Member

That sounds good @sduenas !

@harshalmittal4 if you need any help, just ping us. When you have time, please open an issue and we can discuss there about the details.

Thanks!

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

No branches or pull requests

3 participants