Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up conventional commits + other repo maintenance #8

Merged
merged 2 commits into from
Aug 21, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ storybook-static
*storybook.log
.vscode
frontend-license-report.csv
talisman_report
5 changes: 4 additions & 1 deletion .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ allowed_patterns:
threshold: medium
version: "1.0"
scopeconfig:
- scope: node
- scope: node
fileignoreconfig:
- filename: lefthook.yml
checksum: ceb00460bb36a9b13ccbbc927598aa8757913d04d518f5092a9aa6926261cdc3
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ When you make a commit now, Lefthook will ensure your changes and commit message

- Code is formatted with Prettier
- ESLint passes without warnings
- The commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification
- The commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. If you're making changes to a component, please use the component name as the scope (multiple scopes are allowed).

### Making a release

Expand Down
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
extends: ["@commitlint/config-conventional"],
};
8 changes: 7 additions & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
commit-msg:
commands:
lint-commit-msg:
run: npx --yes commitlint --edit

pre-commit:
parallel: true
commands:
Expand Down Expand Up @@ -56,7 +61,8 @@ pre-push:
run: |
local_reference=$(git rev-parse --symbolic-full-name HEAD)
local_object_name=$(git rev-parse HEAD)
remote_reference=$(git log -1 origin)
# Strong assumption that we run after the commit has been created (not before)!
remote_reference=$(git branch --format="%(upstream)" --list $(git rev-parse --abbrev-ref HEAD))
remote_object_name=$(git rev-parse $remote_reference)

echo $local_reference \
Expand Down
106 changes: 106 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
},
"devDependencies": {
"@chromatic-com/storybook": "~1.6.1",
"@commitlint/config-conventional": "^19.2.2",
"@digitalservice4germany/angie": "~1.2.0",
"@digitalservice4germany/style-dictionary": "~2.0.0",
"@eslint/compat": "^1.1.1",
Expand Down
Loading