mirror of
https://github.com/sebastiandine/Card-Collection-Manager-3.git
synced 2026-08-29 01:08:49 +00:00
major: initial release
* 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>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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
|
||||
Reference in New Issue
Block a user