2023-09-24 11:40:58 +03:00
|
|
|
|
# Основан на https://habr.com/ru/articles/662738/
|
|
|
|
|
name: 'Проверка PR заголовка'
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
pull_request_target:
|
|
|
|
|
types:
|
|
|
|
|
- opened
|
|
|
|
|
- edited
|
|
|
|
|
- synchronize
|
|
|
|
|
|
2023-09-26 10:39:06 +03:00
|
|
|
|
permissions:
|
|
|
|
|
pull-requests: write
|
|
|
|
|
|
|
|
|
|
|
2023-09-24 11:40:58 +03:00
|
|
|
|
jobs:
|
|
|
|
|
main:
|
|
|
|
|
name: Проверка PR заголовка
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
2023-09-24 12:06:13 +03:00
|
|
|
|
- uses: amannn/action-semantic-pull-request@v5
|
2023-09-24 11:40:58 +03:00
|
|
|
|
env:
|
2023-09-24 12:06:13 +03:00
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-09-24 11:40:58 +03:00
|
|
|
|
with:
|
|
|
|
|
# Configure which types are allowed.
|
|
|
|
|
# Default: https://github.com/commitizen/conventional-commit-types
|
|
|
|
|
types: |
|
|
|
|
|
breaking
|
|
|
|
|
chore
|
|
|
|
|
ci
|
|
|
|
|
docs
|
|
|
|
|
feat
|
|
|
|
|
fix
|
|
|
|
|
refactor
|
|
|
|
|
security
|
|
|
|
|
style
|
|
|
|
|
test
|
|
|
|
|
requireScope: false
|
|
|
|
|
subjectPattern: ^(?![A-Z]).+$
|
|
|
|
|
subjectPatternError: |
|
|
|
|
|
Тема "{subject}" найденная в pull request заголовке "{title}"
|
|
|
|
|
не соответствует настроенному шаблону. Пожалуйста, убедитесь,
|
|
|
|
|
что тема не начинается с заглавной буквы.
|
|
|
|
|
wip: true
|
|
|
|
|
validateSingleCommit: false
|