Stop using Mergeable; Replace with own native check #2
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
name: Must include JIRA ticket | |
on: pull_request | |
jobs: | |
validate-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Validate PR Description | |
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' | |
run: | | |
DESCRIPTION=$(jq -r .pull_request.body "$GITHUB_EVENT_PATH") | |
echo "Pull Request Description: $DESCRIPTION" | |
if [[ ! $DESCRIPTION =~ ((?<!([A-Z]{1,10})-?)[A-Z]+\d?-\d+) ]]; then | |
echo "Must include JIRA ticket" | |
exit 1 | |
fi |