NEW: @W-15652620@ - Prepare repo with standard/required files #10
Workflow file for this run
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: validate-pr | |
on: | |
pull_request: | |
types: [edited, opened, reopened, synchronize] | |
jobs: | |
validate_pr_title: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Validate PR Title | |
if: github.base_ref == 'main' | |
run: | | |
title="${{ github.event.pull_request.title }}" | |
if [[ "$title" =~ "^(?i)(FIX|CHANGE|NEW)( ?\\([^()]+\\))? ?: ?@W-\\d{8,9}[ :-]+@.+" ]]; then | |
echo "PR title of '$title' is valid." | |
else | |
echo "::error::Invalid PR title. Please following the format: FIX|CHANGE|NEW (__) @W-XXXXXXXX@ Summary" | |
exit 1 | |
fi |