在詹金斯的github pull request中添加评论

在詹金斯的github pull request中添加评论,第1张

在詹金斯的github pull request中添加评论

我找不到执行此 *** 作的插件,所以我确实使用了curl。这是我的常规功能

def call(def text_pr) {  def repository_url = scm.userRemoteConfigs[0].url  def repository_name = repository_url.replace("[email protected]:","").replace(".git","")  withCredentials([string(credentialsId: '<YOUR-TOKEN-ID>', variable: 'GITHUB_TOKEN')]) {    sh "curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST -d '{"body": "${text_pr}"}' "https://api.github.com/repos/${repository_name}/issues/${ghprbPullId}/comments""  }}


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5088692.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-16
下一篇 2022-11-16

发表评论

登录后才能评论

评论列表(0条)

保存