Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/lint-pull-request-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
jobs:
lint-title:
runs-on: ubuntu-latest
steps:
- name: Check PR Title for Conventional Commit Format
run: |
if ! echo "${{ github.event.pull_request.title }}" | grep -Pq "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!?:\s.*"; then
echo "The title does not conform to the Conventional Commit."
echo "Please refer to 'https://www.conventionalcommits.org/'"
exit 1
fi
name: Lint pull request title
on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited
12 changes: 12 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ stages:
- build_release
default:
image: python:3.11
lint_title:
interruptible: true
only:
- merge_requests
script:
- |
if ! echo "$CI_MERGE_REQUEST_TITLE" | grep -Pq "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!?:\s.*"; then
echo "The title does not conform to the Conventional Commit."
echo "Please refer to 'https://www.conventionalcommits.org/'"
exit 1
fi
stage: lint_test
lint:
image: python:$PYTHON_VERSION
interruptible: true
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"choices",
"stages",
"default",
"lint_title",
"lint",
"test",
"package",
Expand Down
1 change: 1 addition & 0 deletions template/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"choices",
"stages",
"default",
"lint_title",
"lint",
"test",
"package",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
jobs:
lint-title:
runs-on: ubuntu-latest
steps:
- name: Check PR Title for Conventional Commit Format
run: |
if ! echo "${{ github.event.pull_request.title }}" | grep -Pq "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!?:\s.*"; then
echo "The title does not conform to the Conventional Commit."
echo "Please refer to 'https://www.conventionalcommits.org/'"
exit 1
fi
name: Lint pull request title
on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ stages:
- build_release
default:
image: python:{{ default_py }}
lint_title:
interruptible: true
only:
- merge_requests
script:
- |
if ! echo "$CI_MERGE_REQUEST_TITLE" | grep -Pq "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!?:\s.*"; then
echo "The title does not conform to the Conventional Commit."
echo "Please refer to 'https://www.conventionalcommits.org/'"
exit 1
fi
stage: lint_test
lint:
image: python:$PYTHON_VERSION
interruptible: true
Expand Down