Skip to content

Commit d7e8fa2

Browse files
gagikwtrocki
andauthored
chore(ci): add a PR title check workflow (#247)
Co-authored-by: Wojciech Trocki <w.trocki@mongodb.com>
1 parent 4de743d commit d7e8fa2

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.github/workflows/check-pr-title.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Check PR Title"
2+
on:
3+
pull_request:
4+
types:
5+
[
6+
opened,
7+
synchronize,
8+
reopened,
9+
ready_for_review,
10+
labeled,
11+
unlabeled,
12+
converted_to_draft,
13+
edited,
14+
]
15+
16+
permissions:
17+
pull-requests: read # to read PR title and labels
18+
19+
jobs:
20+
check-pr-title:
21+
name: Check PR Title
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Enforce conventional commit style
25+
uses: realm/ci-actions/title-checker@d6cc8f067474759d38e6d24e272027b4c88bc0a9
26+
with:
27+
regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|ops){1}(\([\w\-\.]+\))?(!)?: .*'
28+
error-hint: 'Invalid PR title. Make sure it follows the conventional commit specification (i.e. "<type>(<optional scope>): <description>") or add the no-title-validation label'
29+
ignore-labels: "no-title-validation"

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This project implements a Model Context Protocol (MCP) server for MongoDB and Mo
5555
npm run inspect
5656
```
5757

58-
4. Commit your changes with a descriptive commit message
58+
4. Commit your changes using [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) format.
5959

6060
## Adding tests to the MCP Server
6161

0 commit comments

Comments
 (0)