Skip to content

Commit 4142e94

Browse files
authored
ci: add PR title check (#201)
1 parent cc1f70e commit 4142e94

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/pr_naming.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: PR Conventional Commit Validation
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited]
6+
7+
jobs:
8+
validate-pr-title:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: PR Conventional Commit Validation
12+
uses: ytanikin/pr-conventional-commits@1.4.1
13+
with:
14+
task_types: '["build","chore","ci","docs","feat","fix","perf","refactor","revert","test"]'
15+
add_label: 'false'

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ Open a pull request against the main
4949
[opentelemetry-rust-contrib](https://github.com/open-telemetry/opentelemetry-rust-contrib)
5050
repo.
5151

52+
Your pull request should be named according to the
53+
[conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard. This ensures that
54+
when the PR is squashed into `main`, the resulting commit message is consistent and makes it easier
55+
for us to generate a changelog standard.
56+
5257
> **Note**
5358
> It is recommended to run [pre-commit script](precommit.sh) from the root of
5459
the repo to catch any issues locally.

0 commit comments

Comments
 (0)