Add PR List, Get and Merge support for GitHub and GitLab #111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Jerry Jackson [email protected]
Description
Adds support for listing, getting, and merging pull requests in GitHub and GitLab.
Merge
andSquash
options are supported for merge.List()
,Get()
, andMerge()
operations for pull requests inGitHub
and merge requests inGitLab
.gitprovider.PullRequestInfo
struct to containNumber
(id of pull request) andMerged
(whether or not the PR has been merged)gitprovider.MergeMethod
enum with values formerge
andsquash
Due to GitLab's asynchronous merge status updating, the
GitLab
Merge()
polls for MergeStatus to be updated from "checking" (up to 20 seconds) before giving up. See: https://gitlab.com/gitlab-org/gitlab/-/issues/196962Test results