[feature] Commit comments for a Pull request

This pertains to the availability of commit comments in a pull request. 

As to my best knowledge, the above box appeared in the Files changed  option in a PR, but it doesn’t show up now in any new pull requests made. With regard to the Pull Requests that were opened earlier, the box shows in only some of them. 

Actually we are working on improvements for Perceval (which has an option to retrieve pull request data from Github), and have included a feature to retrieve also the commit comments present in a pull request as part of the retrieved pull request data. So wished to know whether Github has removed support for pull request commit comments or it is some other case that I might be missing on.  

As a reference example, for the pull request present  here, it would really be helpful if somebody could tell how the commit comments present in this pull request were made in the first place.

Thanks!

1 Like

Hi @harshalmittal4 ,

Thanks for this feedback! We’re always working to improve GitHub and the GitHub Community Forum, and we consider every suggestion we receive. I’ve logged your feature request in our internal feature request list. Though I can’t guarantee anything or share a timeline for this, I can tell you that it’s been shared with the appropriate teams for consideration.

Cheers!

Thanks @belhfl for the acknoledgement! Waiting for team’s views on this :slight_smile:

1 Like

Thanks for reaching out @harshalmittal4, let me make I understand the question and or feedback, for the sample repo you’ve provided there are some sample comments that were possibly made via the API. As to why there are fewer comments, there was spam content posted on the thread. Once an user is flagged as spammy the comments are no longer visible. I hope this helps :slight_smile:

Hey @andreagriffiths11, is it possible to make commit comments now also for any PR, or has Github removed support for commit comments? (framing my question better)

Thanks for the clarification @harshalmittal4 as far as I know you can still make commit comments via the commit comment API.

1 Like

Thanks for the reply @andreagriffiths11.

Actualy I was asking about the option for commit comments on Github, as it used to show up earlier. May you please have a look into this once and make me aware how to make commit comments in any PR on Github (on say this PR). 

Thanks a lot for your time :)  

There are three types of comments that relate to pull requests:

  • Pull request comments
  • Line comments
  • Review comments

Pull request comments are made on the Conversation tab, much like Issue comments. Line comments are made by going to the File tab, clicking on a line of code, typing your comment and then pressing the “Add a single comment” button. Review comments are made when filling out the box after pressing the “Review changes” button or before clicking the “Start a review” button. See the linked documentation above for more details.

I suspect you’re asking about line comments. Commit comments are a thing, but they’re associated with a commit, not with a pull request. To create a commit comment, you navigate to the page for an individual commit, like this one. At the bottom of the page, you can create a commit comment.

Now that we’ve defined our terms, can you restate what it is you’re trying to learn?

Thank you @lee-dohm for answering and @harshalmittal4 for triggering the discussion.

The goal of @harshalmittal4 was to retrieve all discussions around a pull request. We followed the documentation here: https://developer.github.com/v3/guides/working-with-comments/, and as presented here: https://developer.github.com/v3/guides/working-with-comments/#commit-comments we thought that commit comments were part of the pull request discussion. However, (as you confirm) they are not part of pull request discussion anymore.

@lee-dohm to avoid any misunderstanding, could you confirm that the API endpoints to retrieve the comments you mention are the ones below ?

pull request comments:  …/issues/<issue_number>/comments

reviews:                          …/pulls/<pr_number>/reviews

line comments:               …/pulls/<pr_number>/comments

Thank you,

Valerio

You can confirm for yourself using this handy pull request I’ve created in my test repo:

I hope that helps!

2 Likes

Perfect, thank you @lee-dohm