Repository navigation
BED-9987 Collect classic PATs from enterprise credential inventory #340
Workflow file for this run
This file contains hidden or 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 Branch Name | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - opened | |
| - edited | |
| - synchronize | |
| - reopened | |
| jobs: | |
| validate-branch: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Validate source branch name | |
| run: | | |
| BRANCH_NAME="${{ github.head_ref }}" | |
| echo "Source branch: $BRANCH_NAME" | |
| if [[ "$BRANCH_NAME" =~ ^(fix|patch|chore|feature|minor|major)\/[A-Za-z0-9._-]+$ ]]; then | |
| echo "Branch name is valid" | |
| else | |
| echo "Invalid branch name!" | |
| echo "" | |
| echo "Allowed formats:" | |
| echo " fix/<description>" | |
| echo " patch/<description>" | |
| echo " feature/<description>" | |
| echo " minor/<description>" | |
| echo " major/<description>" | |
| echo "" | |
| echo "Example:" | |
| echo " feature/add-authentication" | |
| exit 1 | |
| fi |