mirror of
https://github.com/sebastiandine/Card-Collection-Manager-3.git
synced 2026-08-28 17:01:02 +00:00
55ace147bc
* initial development * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * pokemon * pokemon * pokemon * pokemon * pokemon * pokemon * improvements * improvements * ci/cd * ci/cd * improvements * improvements * improvements * improvements * improvements * improvements * improvements * improvements * improvements --------- Co-authored-by: sdine <sdine@sdine.com>
34 lines
929 B
YAML
34 lines
929 B
YAML
name: Master PR Title Guard
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
types:
|
|
- opened
|
|
- edited
|
|
- synchronize
|
|
- reopened
|
|
- ready_for_review
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
validate-title:
|
|
name: Require semver prefix in PR title
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Validate pull request title prefix
|
|
env:
|
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
run: |
|
|
title_lower="$(echo "${PR_TITLE}" | tr '[:upper:]' '[:lower:]')"
|
|
if [[ "${title_lower}" == major* || "${title_lower}" == minor* || "${title_lower}" == fix* || "${title_lower}" == patch* || "${title_lower}" == path* ]]; then
|
|
echo "PR title is valid: ${PR_TITLE}"
|
|
exit 0
|
|
fi
|
|
echo "Invalid PR title: '${PR_TITLE}'"
|
|
echo "Title must start with one of: major, minor, fix, patch, or path."
|
|
exit 1
|