mirror of
https://gh.wpcy.net/https://github.com/verygoodplugins/mcp-freescout.git
synced 2026-07-18 09:23:54 +08:00
* chore(ci): name workflow checks for org rulesets Add explicit CI and PR title check names so the repo can align with org-level required checks without changing existing job behavior. * fix(ci): restore legacy test check name Keep FreeScout mergeable under the current org ruleset by preserving the existing `test` required check while leaving the PR title naming change in place. * chore(ci): drop incidental workflow formatting churn Restore the unchanged FreeScout CI YAML formatting so this PR stays focused on the PR-title workflow change while preserving the existing required `test` check.
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
name: PR Title
|
|
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- opened
|
|
- edited
|
|
- reopened
|
|
- synchronize
|
|
|
|
permissions:
|
|
pull-requests: read
|
|
|
|
jobs:
|
|
conventional-pr-title:
|
|
name: Lint PR Title
|
|
if: ${{ github.event.pull_request.base.ref == 'main' && github.event.pull_request.user.login != 'dependabot[bot]' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Validate conventional PR title
|
|
env:
|
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
run: |
|
|
pattern='^(feat|fix|docs|chore|refactor|test|perf|build|ci|revert)(\([[:alnum:]_.-]+\))?!?: .+'
|
|
|
|
if [[ "$PR_TITLE" =~ $pattern ]]; then
|
|
echo "PR title is valid: $PR_TITLE"
|
|
exit 0
|
|
fi
|
|
|
|
echo "PR title must use Conventional Commits because squash merges become release-please input."
|
|
echo "Allowed prefixes: feat, fix, docs, chore, refactor, test, perf, build, ci, revert"
|
|
echo "Examples:"
|
|
echo " fix: harden push approval auth flow"
|
|
echo " feat(auth): add TOTP support"
|
|
exit 1
|