A demo/draft of spreadsheet code for asset management #528
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: Ticket Check | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
- ready_for_review | |
- converted_to_draft | |
branches: | |
- main | |
jobs: | |
ticket-present: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Ticket Present in PR Title' | |
if: github.event.pull_request.draft == false | |
env: | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
run: | | |
echo "Checking for ticket in PR title..." | |
if [[ "$PR_TITLE" =~ [A-Z]{2,}-[0-9]+ ]]; then | |
echo "Ticket found in PR title!" | |
exit 0 | |
else | |
echo "No ticket found in PR title!" | |
exit 1 | |
fi |