diff --git a/.github/workflows/pr_naming.yml b/.github/workflows/pr_naming.yml new file mode 100644 index 000000000..97f62abfa --- /dev/null +++ b/.github/workflows/pr_naming.yml @@ -0,0 +1,15 @@ +name: PR Conventional Commit Validation + +on: + pull_request: + types: [opened, synchronize, reopened, edited] + +jobs: + validate-pr-title: + runs-on: ubuntu-latest + steps: + - name: PR Conventional Commit Validation + uses: ytanikin/pr-conventional-commits@1.4.1 + with: + task_types: '["build","chore","ci","docs","feat","fix","perf","refactor","revert","test"]' + add_label: 'false' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 55735e80a..408aed10b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,6 +49,11 @@ Open a pull request against the main [opentelemetry-rust-contrib](https://github.com/open-telemetry/opentelemetry-rust-contrib) repo. +Your pull request should be named according to the +[conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard. This ensures that +when the PR is squashed into `main`, the resulting commit message is consistent and makes it easier +for us to generate a changelog standard. + > **Note** > It is recommended to run [pre-commit script](precommit.sh) from the root of the repo to catch any issues locally.