【问题标题】:Merging a merge request using Gitlab API commands使用 Gitlab API 命令合并合并请求
【发布时间】:2019-04-18 06:50:24
【问题描述】:

我正在尝试使用 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

【问题讨论】:

  • 没有message。最有可能在这里:post.getOutputStream().write(message.getBytes("UTF-8"));
  • 我觉得有点不好意思,但是谢谢!就是这样

标签: api groovy merge gitlab commit


【解决方案1】:

cfrick 提供了这个问题的答案

【讨论】:

    猜你喜欢
    • 2019-04-12
    • 1970-01-01
    • 2018-07-05
    • 2018-06-08
    • 2021-06-04
    • 1970-01-01
    • 2016-09-21
    • 2019-03-13
    • 2016-07-11
    相关资源
    最近更新 更多