diff --git a/.github/workflows/pr-title-validation.yml b/.github/workflows/pr-title-validation.yml new file mode 100644 index 000000000..edb22b894 --- /dev/null +++ b/.github/workflows/pr-title-validation.yml @@ -0,0 +1,30 @@ +name: Pull Request Title Validation + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + - reopened + +jobs: + validate-title: + name: Validate Pull Request Title + runs-on: ubuntu-latest + permissions: + pull-requests: read + steps: + - name: Validate semantic pull request title + uses: amannn/action-semantic-pull-request@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + fix + feat + chore + refactor + docs + disallowScopes: | + .+ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..91c4bd7e2 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Contributing to OpenCATS + +## Pull Request Title Format + +Pull request titles must follow this format: + +`type: description` + +Allowed types are `fix`, `feat`, `chore`, `refactor` and `docs`. + +Scopes are currently not allowed. For example, `fix: correct login redirect` is valid but `fix(auth): correct login redirect` is not.