-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from prisma/DA-1571
feat(custom): add conventional commits
- Loading branch information
Showing
7 changed files
with
2,913 additions
and
157 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,27 @@ | ||
module.exports = { | ||
types: [ | ||
{ value: "feat", name: "feat: ✨ A new feature" }, | ||
{ value: "fix", name: "fix: 🐛 A bug fix" }, | ||
{ value: "docs", name: "docs: 📚 Documentation" }, | ||
{ value: "style", name: "style: 💄 Code style changes" }, | ||
{ value: "refactor", name: "refactor: ♻️ Code restructuring" }, | ||
{ value: "perf", name: "perf: ⚡ Performance improvements" }, | ||
{ value: "test", name: "test: ✅ Adding or modifying tests" }, | ||
{ value: "chore", name: "chore: 🔧 Other changes" }, | ||
], | ||
scopes: [], | ||
allowCustomScopes: true, | ||
allowBreakingChanges: ["feat", "fix"], | ||
messages: { | ||
type: "Select the type of change you're committing:", | ||
scope: "Specify the scope (optional):", | ||
customScope: "Specify the custom scope:", | ||
subject: "Write a short description of the change:", | ||
body: "Provide a longer description (optional):", | ||
breaking: "List any BREAKING CHANGES (optional):", | ||
footer: "Add issue number (e.g., #1234):", | ||
confirmCommit: "Confirm your commit message:", | ||
}, | ||
footerPrefix: "Issue:", | ||
subjectLimit: 100, | ||
}; |
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,4 @@ | ||
{ | ||
"path": "node_modules/cz-customizable", | ||
"config": ".cz-config.cjs" | ||
} |
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: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read # for checkout | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
- run: npm clean-install | ||
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | ||
run: npm audit signatures | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_NUXT_TOKEN }} | ||
run: npm run release |
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,11 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
# Run commitlint to check the commit message format | ||
npx --no -- commitlint --edit "$1" | ||
|
||
# If no commit message is provided, use Commitizen | ||
if [ -z "$1" ]; then | ||
exec < /dev/tty && npm run commit | ||
exit 1 # Stop the default git commit message prompt | ||
fi |
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 @@ | ||
module.exports = { | ||
extends: ["@commitlint/config-conventional"], | ||
rules: { | ||
"scope-max-length": [2, "always", 80], | ||
}, | ||
}; |
Oops, something went wrong.