AttributeError:“Gitlab”对象没有“project\u mergerequests”属性

2024-04-23 14:28:56 发布

您现在位置:Python中文网/ 问答频道 /正文

一个詹金斯的工作失败了: [管道]sh [QA_MR_测试@2]运行shell脚本

+ python ci/jenkins/git_utils.py --isMergeable --gitlabURL=https://git.developers.burberry.com --gitlabToken=**** --gitlabProjectId=959 --gitlabMRId=23702
Traceback (most recent call last):
  File "ci/jenkins/git_utils.py", line 291, in <module>
    getGitLabMergeStatus2(args.glUrl, args.glToken, args.glProjectId, args.glMrId)
  File "ci/jenkins/git_utils.py", line 60, in getGitLabMergeStatus2
    mr = gl.project_mergerequests.get(int(glMrId), project_id=int(glPrId))
AttributeError: 'Gitlab' object has no attribute 'project_mergerequests'

3管道方法:

^{pr2}$

2还有一个(呼叫3):

^{3}$

然而(打电话2):

def mrgbl = sh(script: """python ci/jenkins/git_utils.py --isMergeable --gitlabURL="${props.GITLABURL}" --gitlabToken="${GITTOKEN}" --gitlabProjectId="${props.GITLABPROJECTID}" --gitlabMRId="${env.gitlabMergeRequestId}" """, returnStdout: true).trim()

为什么不起作用?在


Tags: pygitprojectci管道shargsutils