improve UX around non-merged parent commits
refs CCI-364 Change-Id: I4bb5ee8ff453833f4ecbf0c86d7496a9751d936e Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239657 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Ryan Norton <rnorton@instructure.com> Product-Review: Aaron Ogata <aogata@instructure.com> Reviewed-by: Ryan Norton <rnorton@instructure.com>
This commit is contained in:
parent
99aeb24185
commit
ea8587774a
|
@ -421,7 +421,9 @@ pipeline {
|
|||
script {
|
||||
if (isPatchsetSlackableOnFailure()) {
|
||||
def branchSegment = env.GERRIT_BRANCH ? "[$env.GERRIT_BRANCH]" : ''
|
||||
def authorSegment = env.GERRIT_EVENT_ACCOUNT_NAME ? "Patchset by ${env.GERRIT_EVENT_ACCOUNT_NAME}. " : ''
|
||||
def authorSlackId = env.GERRIT_EVENT_ACCOUNT_EMAIL ? slackUserIdFromEmail(email: env.GERRIT_EVENT_ACCOUNT_EMAIL, botUser: true, tokenCredentialId: 'slack-user-id-lookup') : ''
|
||||
def authorSlackMsg = authorSlackId ? "<@$authorSlackId>" : env.GERRIT_EVENT_ACCOUNT_NAME
|
||||
def authorSegment = authorSlackMsg ? "Patchset by ${authorSlackMsg}. " : ''
|
||||
slackSend(
|
||||
channel: '#canvas_builds',
|
||||
color: 'danger',
|
||||
|
|
|
@ -31,7 +31,7 @@ export GERGICH_REVIEW_LABEL="Lint-Review"
|
|||
# when parent is not in \$GERRIT_BRANCH (i.e. master)
|
||||
if ! git merge-base --is-ancestor HEAD~1 \$GERRIT_BRANCH; then
|
||||
message="This commit is built upon commits not currently merged in \$GERRIT_BRANCH. Ensure that your dependent patchsets are merged first!\\n"
|
||||
gergich comment "{\"path\":\"/COMMIT_MSG\",\"position\":1,\"severity\":\"error\",\"message\":\"\$message\"}"
|
||||
gergich comment "{\"path\":\"/COMMIT_MSG\",\"position\":1,\"severity\":\"warn\",\"message\":\"\$message\"}"
|
||||
fi
|
||||
|
||||
# we need to remove the hooks because compile_assets calls yarn install which will
|
||||
|
|
Loading…
Reference in New Issue