-
Notifications
You must be signed in to change notification settings - Fork 88
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
feat: Add support for creating PullRequests. #63
Conversation
Hi @bigkevmcd. Thanks for your PR. I'm waiting for a jenkins-x member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This adds support for creating a PullRequest with title, body branch references in the GitHub and GitLab drivers. The fake driver records created PullRequestInput records. The other drivers return NotSupported errors.
/ok-to-test |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jstrachan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Basically the same as jenkins-x#63, but for updating rather than creating. Again only supporting GitHub and GitLab right now, but I'll come back and do BitBucket and Stash (aka Cloud and Server) sometime in the non-distant future. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
@bigkevmcd Sorry to bug you, but have you actually tested the PR creation on gitlab? I have a sinking feeling it won't do anything - go-scm/scm/driver/gitlab/gitlab.go Line 58 in 6796482
in to the request, which...yeah, that'll be a problem. =) I'll play around with it on #68, where I'm adding updating PRs, but I think we need to do something more like go-scm/scm/driver/gitlab/issue.go Lines 83 to 85 in b82884a
I'm legitimately not sure why we're encoding as parameters rather than just passing as data with |
@abayer sorry, I was travelling last week. I tested the GitHub version, but alas, I didn't test the GitLab one, and naively assumed that the tests would cover it, dunno why I didn't test it given that it was a 2 line change to run the code against GitLab, and yes, it responds with a 400. I'm happy to rework the implementation to convert to JSON, which is what it should be doing, yes. |
No worries! I'm traveling this week, so my responses won't be timely either. =) I've started reworking the gl web hook stuff completely - no rush on the GL api side from my perspective. It feels like a lot of the GL code was copied loosely from somewhere else without fully implementing everything, let alone testing it, so I don't expect this is gonna be speedy. |
Oh, and at least it's not BitBucket. Sigh. |
This adds support for creating a PullRequest with title, body branch references in the GitHub and GitLab drivers.
The fake driver records created PullRequestInput records.
The other drivers return NotSupported errors.