feat: Add MergeAsync and GetMergeAsyncResult support - #4491
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
recheck |
1 similar comment
|
recheck |
|
hi, @gmlewis ! |
MergeAsync and GetMergeAsyncResult support
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4491 +/- ##
=======================================
Coverage 98.52% 98.53%
=======================================
Files 195 195
Lines 17729 17747 +18
=======================================
+ Hits 17468 17487 +19
+ Misses 261 260 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
alexandear
left a comment
There was a problem hiding this comment.
Please improve naming for consistency.
Co-authored-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
Co-authored-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
|
|
||
| var result *PullRequestMergeAsyncResult | ||
| resp, err := s.client.Do(req, &result) | ||
| if err != nil { |
There was a problem hiding this comment.
This endpoint can return a 202 AcceptedError - other places where this happens is either handled in the function or documented in the function docs. Not sure what the maintainers prefer but we should do something here
There was a problem hiding this comment.
It seems like adding a comment in the function docs would be sufficient here - do you agree, @DP19?
There was a problem hiding this comment.
Since this is an asynchronous call anyway, I think a comment should be just fine. In those other examples, users were waiting for the upload, but here, they are explicitly calling an async endpoint anyway and are planning on waiting. Thoughts?
Adds support for the asynchronous pull request merge endpoints, needed for merging stacked pull requests (the existing
Mergemethod doesn't support stacks).PullRequestsService.MergeAsync—PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge-asyncPullRequestsService.GetMergeAsyncResult—GET /repos/{owner}/{repo}/pulls/{pull_number}/merge-async/{uuid}Docs:
Closes #4485