github-api icon indicating copy to clipboard operation
github-api copied to clipboard

Include Project card details into response when listing issue events

Open annguyen-qh opened this issue 5 years ago • 6 comments

It would be great if the GHIssueEvent class could include Project card details. This information is valuable with project-related issue events

The relevant GitHub API endpoint is GET /repos/:owner/:repo/issues/:issue_number/events - https://developer.github.com/v3/issues/events/#list-issue-events

annguyen-qh avatar Aug 18 '20 05:08 annguyen-qh

Hi, Please correct me - but what is needed here is addition of data member GHProjectCard in GHIssueEvent. I can proceed with this then ?

ghost avatar Jan 04 '21 09:01 ghost

@ki45 Yes, but you'll need to enable the preview under "Preview notice" in the doc link above.

Please take this issue and give it a try. If you get stuck or have questions, drop them here or in the gitter channel.

bitwiseman avatar Jan 05 '21 01:01 bitwiseman

Hi

Apologies for the late reply. I do not understand what is meant by enable preview. This is my first time contributing to a repo someone else owns. The link above leads to a reference doc for the github rest api. So how do I enable preview ? Please explain once and for posterity.

ghost avatar Jan 07 '21 10:01 ghost

@ki45 These are preview api: https://docs.github.com/en/free-pro-team@latest/rest/overview/api-previews

API previews let you try out new APIs and changes to existing API methods before they become part of the official GitHub API.

During the preview period, we may change some features based on developer feedback. If we do make changes, we'll announce them on the developer blog without advance notice.

To access an API preview, you'll need to provide a custom media type in the Accept header for your requests. Feature documentation for each preview specifies which custom media type to provide.

To see examples of how previews work in this library, look at any method that uses the withPreview() method such as:

https://github.com/hub4j/github-api/blob/a585b4957fbe5e1753ae03b2f9e822ec74b85e99/src/main/java/org/kohsuke/github/GHApp.java#L200-L220

bitwiseman avatar Jan 07 '21 16:01 bitwiseman

Apologies for the late reply. I have enabled preview with the path mentioned by @annguyen-qh in GHIssueEvent. Please advise on how I can proceed.

githubapipic

ghost avatar Jan 17 '21 15:01 ghost

@ki45 Does it work?
Write some tests! See the CONTRIBUTING.md file for instructions.

bitwiseman avatar Jan 21 '21 16:01 bitwiseman