-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
create reaction for commit comment #1302
Comments
HI Shiftkey, i'm working on this feature for commits, issues, .... Is this Ok? |
@lrz-hal that's fine, thanks for the heads up! |
@shiftkey I have a question over the proposed implementation of these reaction calls. In the github API docs, these all sit underneath a top level "Reactions" section... so wouldnt that mean for octokit.net we should be creating a new |
@ryangribble I'm not locked into the approach that I've chosen, so I can be talked off this ledge. There's a couple of places in the API documentation where the structure doesn't reflect the underlying resources (for example, Pull Requests) and this one I'm pushing back on for a couple of reasons:
I can see from the documentation side how it's easier to group these new methods together, however it didn't feel natural to me when I was comparing it to how things are currently structured. Thoughts? |
Documentation wise I swing either way, but for implementations - definitely feel each client that needs reactions should have such a method. One idea that I have no idea if it's feasible as I'm not checking code is to have an interface that defines the reaction methods and then clients that expose that will provide specific implementation |
So then each client should also have a get method. Right? |
@maddin2016 I've grouped up all the open issues under the https://github.com/octokit/octokit.net/issues?q=is%3Aissue+is%3Aopen+label%3Areactions |
That's what's getting me a bit unstuck though... The delete method deletes ANY reaction, so it doesn't seem good to duplicate that on all the commit pull request issue issue comment etc clients. But having delete sitting out on it's own under a Reactions client isn't intuitive either. This is why I was questioning why we wouldn't just parallel the official documentation structure and have it all under "Reactions" client Are there precedents where octokit doesn't align with the API docs currently? There are plenty of things we could move around and group together that would make more sense but we haven't done so (i assume because that diverges from the API documentation layout) I'm really not phased either way I just like to clarify my own understanding of our guidelines/decisions to follow |
For me the api not feels (I dont find a better word for it) naturally. If you look at the api docs, there are root objects like gists, repositories, issues and reactions. All except reactions ( i exclude labels because i dont understand why they stay under issues. For me labels are also root objects because i can get and create labels for repositories and labels for issues. But this belongs to another discussion) implement the same schema. |
👍 to bringing it all under the root |
👍 |
fixed by #1335 |
Link: https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment
This is a new endpoint which should live in
IRepositoryCommentsClient
POST /repos/:owner/:repo/comments/:id/reactions
Example request payload:
As these are a limited subset of emojis, the request object should use an enumeration of values - rather than a regular string.
Example response payload:
Octokit
project and.\build FixProjects
to make them available everywhereIReactionsClient
IObservableReactionsClient
application/vnd.github.squirrel-girl-preview
The text was updated successfully, but these errors were encountered: