Skip to content

Instantly share code, notes, and snippets.

@benkutil
Last active April 4, 2017 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benkutil/f1966d45773769fd0b3f00e1b9dbd773 to your computer and use it in GitHub Desktop.
Save benkutil/f1966d45773769fd0b3f00e1b9dbd773 to your computer and use it in GitHub Desktop.
Script to run as part of Jenkins validation of pull requests. Helps to ensure all merged PRs have a Jira ticket in their title
PRMATCH=`echo "$ghprbPullTitle" | sed -n "/release notes\|\[[A-Za-z0-9]\+-[0-9]\+\]/Ip"
if [[ -n "$ghprbPullTitle" ]] && [[ -z "$PRMATCH" ]]; then
echo "$ghprbPullTitle does not contain a JIRA ticket"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment