-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fdf07a4
commit 513812d
Showing
4 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: 🦄 PR | ||
|
||
on: [ pull_request ] | ||
|
||
jobs: | ||
commitlint: | ||
name: Validate title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.7.5 | ||
|
||
- name: Fetch commitlint config package version | ||
id: config-package-version | ||
env: | ||
GITMOJI_CONFIG_PACKAGE: "commitlint-config-gitmoji" | ||
run: | | ||
echo "CONFIG_PACKAGE=$(grep -A 2 "$GITMOJI_CONFIG_PACKAGE" pnpm-lock.yaml | awk '/version:/ {print "'"$GITMOJI_CONFIG_PACKAGE"'@" $2}')" >> $GITHUB_OUTPUT | ||
- name: Install commitlint config package | ||
env: | ||
CONFIG_PACKAGE: "${{ steps.config-package-version.outputs.CONFIG_PACKAGE }}" | ||
run: | | ||
pnpm add $CONFIG_PACKAGE | ||
- name: Validate PR title | ||
run: | | ||
echo "${{ github.event.pull_request.title }}" | pnpm -s dlx commitlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
extends: [ 'gitmoji' ], | ||
rules: { | ||
'subject-case': [2, 'always', 'sentence-case'], | ||
'header-max-length': [2, 'always', 72], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"private": true, | ||
"devDependencies": { | ||
"commitlint-config-gitmoji": "^2.3.1" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.