0-0. Иванов Иван Иванович. 1234567890а. Проверка имени, описание и коммитов реквеста #5
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: "Check PR Title" | |
on: | |
pull_request: | |
types: [opened, edited, reopened, synchronize] | |
workflow_call: | |
permissions: | |
contents: read | |
jobs: | |
pr-title: | |
name: Validate PR title | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Skip when PR edited without title change | |
if: github.event_name == 'pull_request' && github.event.action == 'edited' && !contains(toJson(github.event.changes), 'title') | |
run: echo "PR edited without title change; skipping title check." | |
- name: Checkout repository (sparse, PR head) | |
if: github.event_name == 'pull_request' && (github.event.action != 'edited' || contains(toJson(github.event.changes), 'title')) | |
uses: actions/checkout@v5 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 1 | |
sparse-checkout: | | |
scripts | |
sparse-checkout-cone: true | |
- uses: actions/setup-python@v5 | |
if: github.event_name == 'pull_request' && (github.event.action != 'edited' || contains(toJson(github.event.changes), 'title')) | |
with: | |
python-version: '3.x' | |
- name: Run PR title check | |
if: github.event_name == 'pull_request' && (github.event.action != 'edited' || contains(toJson(github.event.changes), 'title')) | |
run: | | |
python3 scripts/check_pr_title.py "${{ github.event.pull_request.title }}" |