diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml new file mode 100644 index 0000000..db4bf61 --- /dev/null +++ b/.github/workflows/pr-title.yml @@ -0,0 +1,42 @@ +# Основан на https://habr.com/ru/articles/662738/ +name: 'Проверка PR заголовка' + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + name: Проверка PR заголовка + runs-on: ubuntu-latest + steps: + # Please look up the latest version from + # https://github.com/amannn/action-semantic-pull-request/releases + - uses: amannn/action-semantic-pull-request@v3.4.6 + env: + GITHUB_TOKEN: ${{ secrets.TERRAFORM_YANDEX_COMPUTE_TOKEN }} + 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 \ No newline at end of file