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

Add reactions to issue comments response payload #1295

Closed
ja1984 opened this issue May 17, 2016 · 3 comments
Closed

Add reactions to issue comments response payload #1295

ja1984 opened this issue May 17, 2016 · 3 comments
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone

Comments

@ja1984
Copy link

ja1984 commented May 17, 2016

Github have added reactions to the issues, comments and pull requests. It would be a really cool feature to have, it's however opt in via header for now.

https://developer.github.com/changes/2016-05-12-reactions-api-preview/
https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue

An additional reactions object in the issue comment payload is currently available for developers to > preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.

To access the API you must provide a custom media type in the Accept header:
application/vnd.github.squirrel-girl-preview
The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.

{
  "total_count": 5,
  "+1": 3,
  "-1": 1,
  "laugh": 0,
  "confused": 0,
  "heart": 1,
  "hooray": 0,
  "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1/reactions"
}
@shiftkey shiftkey changed the title Add support for reactions Add support for reactions to issue comments May 17, 2016
@shiftkey
Copy link
Member

@ja1984 I'd love to see this land with some preview support. As it looks like the reactions model are the same shape whether it is for issues, issue comments, pull requests or review comments we can roll this out gradually. The first PR can add the model, set the preview header and add some tests - and the others can follow.

I've renamed this task to focus on issue comments, and I'll open tasks for the other areas.

@shiftkey shiftkey changed the title Add support for reactions to issue comments Add reactions to issue comments response payload May 17, 2016
@ryangribble
Copy link
Contributor

Hey @alfhenrik that's awesome!

Just a heads up that some other related changes are occurring in #1335 (for creating and deleting the reactions)... For this issue you'd want to use the same ReactionType enum created there etc

@hnrkndrssn
Copy link
Contributor

I'll get a start on this and add in a few TODOs to use the AcceptHeaders.ReactionsPreview property being introduced in #1335

@shiftkey shiftkey modified the milestone: Reactions Support Jun 14, 2016
@nickfloyd nickfloyd added Status: Up for grabs Issues that are ready to be worked on by anyone and removed up-for-grabs labels Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone
Projects
None yet
Development

No branches or pull requests

5 participants