diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml new file mode 100644 index 0000000..f046139 --- /dev/null +++ b/.github/workflows/pr-lint.yml @@ -0,0 +1,15 @@ +name: PR lint + +on: + pull_request: + types: ['opened', 'edited', 'reopened', 'synchronize'] + +jobs: + pr-lint: + runs-on: ubuntu-latest + steps: + - uses: seferov/pr-lint-action@master + with: + title-regex: '^((Pulling|Update from) refs\/heads\/|(\[tf (plan|apply|destroy|status)\]|\[non tf\])\s(feat|fix|build|chore|ci|docs|style|refactor|perf|test)(\!?): (.{3,250})[^\s*]$)' + github-token: ${{ secrets.GITHUB_TOKEN }} + auto-close-message: 'Closing this pull request since the title does not match %pattern% pattern. Please fix the title and re-open the pull request.'