Skip to content

Add reactions to Issue type#483

Closed
kafji wants to merge 2 commits intohaskell-github:masterfrom
kafji:master
Closed

Add reactions to Issue type#483
kafji wants to merge 2 commits intohaskell-github:masterfrom
kafji:master

Conversation

@kafji
Copy link
Copy Markdown

@kafji kafji commented Jun 7, 2022

for deserializing issue's reactions which returned in some of the endpoints, for example https://api.github.com/repos/ghc-proposals/ghc-proposals/issues

I also add /.hspec-failures to gitignore.

, issueId :: !(Id Issue)
, issueComments :: !Int
, issueMilestone :: !(Maybe Milestone)
, issueReactions :: !(Maybe IssueReactions)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this is https://docs.github.com/en/rest/reactions#list-reactions-for-an-issue , is it?
Would you mind adding the link as a haddock comment to this field?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Andreas, thanks for reviewing this.

I suppose this is https://docs.github.com/en/rest/reactions#list-reactions-for-an-issue , is it?

It isn't. It's for key reactions in list-repository-issues.

If you have curl & jq, this should print a json object that matches IssueReactions which differ from list-reactions-for-an-issue.

curl \
  -X GET \
  -H "Accept: application/vnd.github.v3+json" \
  https://api.github.com/repos/ghc-proposals/ghc-proposals/issues \
  | jq .[0].reactions

The .[0].reactions.url however, is indeed a link for list-reactions-for-an-issue. Do you think we should add link to list-reactions-for-an-issue for IssueReactions.issueReactionsUrl?

@andreasabel
Copy link
Copy Markdown
Member

Thanks for the PR, @kafji!

@andreasabel andreasabel added this to the 0.29 milestone Jul 23, 2022
@andreasabel
Copy link
Copy Markdown
Member

andreasabel commented Jul 23, 2022

Please add a link to the documentation as given in your comment #483 (comment), and add a demonstration of this new feature to samples/. (It is OK of course to extend an existing sample with your new feature, if you find something suitable.)

@andreasabel andreasabel self-requested a review July 23, 2022 10:13
Copy link
Copy Markdown
Member

@andreasabel andreasabel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • link to documentation in code
  • demonstration of new code in samples/ or testsuite

@kafji kafji closed this by deleting the head repository Sep 17, 2022
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

Successfully merging this pull request may close these issues.

2 participants