diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml new file mode 100644 index 000000000..4c730a57d --- /dev/null +++ b/.github/workflows/pr-lint.yml @@ -0,0 +1,22 @@ +name: GitHub PR Lint + +on: + pull_request_target: + types: + - opened + - edited + - reopened + - synchronize + +jobs: + semantic-pr: + name: Validate semantic PR title + runs-on: ubuntu-latest + + steps: + - name: Semantic PR title + uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + subjectPattern: ^(?![A-Z]).+$ # This pattern ensures the subject doesn't start with an uppercase character. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3757e042e..fa6c305b4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,7 +44,14 @@ You SHOULD write (or update) documentation. You SHOULD write [commit messages that make sense](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). -You MUST [rebase your branch](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) before submitting your Pull Request. +### Pull requests -While creating your Pull Request on GitHub, you MUST write a description which gives the context and/or explains why you -are creating it. +You MUST [rebase your branch](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) before submitting your pull request. + +You MUST use a pull request title compliant with the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. + +You MUST write a meaningful description which gives the context and/or explains why you +are creating the pull request. + +You SHOULD resolve review comments instead of commenting. +Once you've done the work, resolve the conversation by selecting the Resolve conversation button in the PR overview. Avoid posting comments like "I've done the work", or "Done". \ No newline at end of file