Created
May 19, 2020 13:59
-
-
Save ajohnstone/060f5bb6691d2f0a7442e79884c7c666 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( pullRequest.title.toString() =~ /^([A-Z]+\-[0-9]+|NO_JIRA)/ ) { | |
echo 'invalid-jira - ' + pullRequest.title | |
pullRequest.createStatus(status: 'success', | |
context: 'pull-request-fmt', | |
description: 'pull request contains valid jira ticket', | |
targetUrl: "${env.JOB_URL}/testResults") | |
} else { | |
echo 'valid-jira - ' + pullRequest.title | |
pullRequest.createStatus(status: 'failure', | |
context: 'pull-request-fmt', | |
description: 'pull request does not contain valid jira ticket e.g. SHP-1234|NO_JIRA', | |
targetUrl: "${env.JOB_URL}/testResults") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment