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

Support Draft Pull Requests API Public Beta #1120

Closed
dmitshur opened this issue Feb 15, 2019 · 2 comments
Closed

Support Draft Pull Requests API Public Beta #1120

dmitshur opened this issue Feb 15, 2019 · 2 comments

Comments

@dmitshur
Copy link
Member

dmitshur commented Feb 15, 2019

GitHub Developer API announcement: https://developer.github.com/changes/2019-02-14-draft-pull-requests/.

It looks like we'll need the following for this issue:

  • a new media type (application/vnd.github.shadow-cat-preview+json) must be added to github.go,
  • this media type must be added to the header of calls to all affected endpoints (list PRs, get a single PR),
  • a new Draft field must be added to the PullRequest struct that is returned from list/get PR endpoints,
  • and also to NewPullRequest struct used for creating a PR, Edit: This doesn't need to be done; this isn't a part of the preview API at this time.
  • the PullRequestsService.Edit needs to be updated to allow the new Draft field to be passed Edit: This doesn't need to be done; this isn't a part of the preview API at this time.

This would be a great PR for any new contributor to this repo or a new Go developer. All contributions are greatly appreciated!

Feel free to volunteer for any issue and the issue can be assigned to you so that others don't attempt to duplicate the work.

Please check out our CONTRIBUTING.md guide to get started.

Thank you!

@joshuabezaleel
Copy link
Contributor

Hi @dmitshur , I am really new to Go and this repo but I tried to take a shot on this. I am sorry if there's anything wrong. Hope this works.

Looking forward to the review.
Thank you very much.

@dmitshur
Copy link
Member Author

I am really new to Go and this repo but I tried to take a shot on this. I am sorry if there's anything wrong.

@joshuabezaleel Thank you for doing that! You don't have to worry, we have code review exactly so that we can improve the PR and get it into a mergeable state.

dmitshur pushed a commit that referenced this issue Feb 15, 2019
This change implements support for a preview of a new Draft Pull
Requests API, announced at
https://developer.github.com/changes/2019-02-14-draft-pull-requests/.

• Add new media type constant.
• Use that media type in "list pull requests" and "get pull request"
  endpoints.
• Add Draft struct field to the PullRequest struct.

The "create pull request" and "update pull request" endpoints don't set
the new media type yet, but that can be dealt with in a future change.

Fixes #1120.
n1lesh pushed a commit to n1lesh/go-github that referenced this issue Oct 2, 2020
This change implements support for a preview of a new Draft Pull
Requests API, announced at
https://developer.github.com/changes/2019-02-14-draft-pull-requests/.

• Add new media type constant.
• Use that media type in "list pull requests" and "get pull request"
  endpoints.
• Add Draft struct field to the PullRequest struct.

The "create pull request" and "update pull request" endpoints don't set
the new media type yet, but that can be dealt with in a future change.

Fixes google#1120.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants