-
Notifications
You must be signed in to change notification settings - Fork 620
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
Make Jenkins approve Merge Requests #95
Comments
+1 i'd also like to use jenkins as an approver |
Or maybe use the 👎 👍 voting to trigger a merge, that would also be availabe for the Gitlab CE. |
+1 for jenkins as an approver! |
+1 (Unless there is a less hacky way to enforce "No merging unless you pass unit tests") |
+1 |
@dblessing what would Jenkins have to send back in order to give a +1 to a merge request? |
As of GitLab 8.5.0, the "Merge when build succeeds" feature will work with
|
It isn't clear to me what exactly people are asking for, or whether it is already supported by the plugin. I thought that the "Accept merge request on successful build" feature is it, and the author of that code said it was working in his setup. So now I don't understand what is changing on the GitLab side in 8.5.0 :) |
The author requested to add the functionality to approve a MR instead of accepting it by the Jenkins. Approving MRs is a feature of the GitLab EE (You can configure that a MR requires a given number of approvals before it can be accepted). But AFAIK there is no API provided by GitLab for approving MRs. At least I haven't found any documentation for this. |
I noticed this was closed. Has this been completed, dropped, or is it duplicated in some way? One of our projects is requesting that merges cannot be accepted until a successful build and this request would fit the bill nicely. Would this be doable via the functionality of this pull request? #72 |
@kalibyrn from what we can tell, "approve MR" is a feature of GitLab EE only. As far as we know, there is no API on the GitLab side that we could use to send this approval from Jenkins. So the plugin currently supports things like "voting" (+1), commenting, and actually accepting/merging MRs. If you want this other functionality, we don't see a way to provide it currently. |
@omehegan it seems that they have an API for that now: https://docs.gitlab.com/ee/api/merge_requests.html#approve-merge-request |
@borgiani my concern about this is that it's a GitLab Enterprise-only feature. Supporting this would be a first for the plugin, because we would need some UI to warn users that it only works with Enterprise, and I'm sure we would still get erroneous bug reports about it. But I will reopen it as a feature request. |
+1 for this feature! even though it's only for gitlab EE it would be very helpfull |
+1 |
I've got an initial working implementation for this and would be willing to open a MR for this, if @omehegan thinks this would be something that would fit into the plugin. |
@padyx yeah I am interested, at this point we do have at least one other EE-only tie-in. Please open a PR, and if you need support from GitLab to answer questions about the API or something, we can ask them for it. |
I have uploaded a build of the plugin which includes this PR (from #817). If you are interested in this feature, please install http://repo.jenkins-ci.org/snapshots/org/jenkins-ci/plugins/gitlab-plugin/1.5.12-SNAPSHOT/gitlab-plugin-1.5.12-20181227.052257-3.hpi and provide any feedback you can. |
I just installed this plugin and I was looking for this feature. I've got 1.5.13 installed but I don't have the option to approve a merge request. @omehegan is this still only available in the snapshot you posted? It would be awesome if this could get released officially. I'm able to do any testing you might need. Is it worth installing the older version, or could is it possible to get this feature added to a newer snapshot version? |
Gitlab EE v 7.12.0 introduced the feature 'Project setting: approve merge request by N users before accept'. We'd like to configure that there are 2 approvals required in order to merge a MR. One of the approvals should be done by the jenkins build which builds the MR. As far as I can see a merge-request-triggered jenkins build adds a comment to the MR - it would be cool if the jenkins build would approve the merge-request.
The text was updated successfully, but these errors were encountered: