我想确保推送分支上的所有提交消息都具有时间日志
即。 add readme /spend 5m
我想在bitbucket管道中的两个git分支之间获取提交差异,
这是我的yaml管道配置:
pipelines:
default:
- step:
script:
- git log $BITBUCKET_BRANCH --oneline --not master
Run Code Online (Sandbox Code Playgroud)
$ BITBUCKET_BRANCH是管道正在作用的分支。
但是管道尝试与主管道比较时返回错误
+ git log $BITBUCKET_BRANCH --oneline --not master
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Run Code Online (Sandbox Code Playgroud)
请注意,管道中的设置步骤(这是由bitbucket预定义的,我无法更改)
git clone --branch="abdullah-s/bitbucketpipelinesyml-created-online-wit-1489917130851" --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/abdullah-s/webook.git $BUILD_DIR;
git reset --hard ac61f080a28428bdd885735374164577a2b0aa43;
git remote set-url origin git@bitbucket.org:abdullah-s/webook.git
Run Code Online (Sandbox Code Playgroud)
在设置的第一个命令中,bitbucket从我的存储库中仅克隆了一个分支
我试图拉大师
- …Run Code Online (Sandbox Code Playgroud) 创建合并请求后.gitlab-ci.yml,我正在验证合并请求的所有提交消息,我正在使用,我的作业当前验证提交消息以在其中包含时间日志,即。init project /spend 1h30m
如果 CI 未能验证合并请求的提交消息,我想显示一条错误消息说 Error: some commits are missing time logs
这是我目前得到的,我想把错误而不是“此合并请求的管道失败”或该框中的某些位置
slack只提供两种类型的响应: