繁体   English   中英

使用Gitlab API命令合并合并请求

[英]Merging a merge request using Gitlab API commands

我正在尝试使用gitlab api合并合并请求,以下是我正在使用groovy进行的操作,但是我一直遇到错误,对此我很陌生,因此非常感谢您的帮助!

def MRUrl = "https://gitlab.domain.com/api/v4/projects/project_name/merge_requests/113/merge"

def post = new URL(MRUrl).openConnection();
post.setRequestMethod("PUT")
post.setDoOutput(true)
post.setRequestProperty("Private-Token", "${Key}")
post.getOutputStream().write(message.getBytes("UTF-8"));

def responseCode = post.getResponseCode();

Error / exception:
No such property: message for class: gitLab

gitlab API调用来自以下文档。 https://docs.gitlab.com/ee/api/merge_requests.html#accept-mr

cfrick提供了此问题的答案

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM