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
3 changes: 3 additions & 0 deletions .hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

task commitlint -- --commit-msg-file $1
3 changes: 0 additions & 3 deletions .hooks/pre-commit

This file was deleted.

3 changes: 3 additions & 0 deletions .hooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

exec </dev/tty && task check --output prefixed
5 changes: 5 additions & 0 deletions .hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

if [[ $2 != "message" && $3 == "" ]]; then
exec </dev/tty && task commit -- --dry-run --write-message-to-file $1
fi
8 changes: 6 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ version: "3"
vars:
DB_URL: "postgres://postgres:postgres@postgres:5432/postgres?sslmode=disable"

output: prefixed

tasks:
# Docker-related tasks
up:
Expand Down Expand Up @@ -175,3 +173,9 @@ tasks:
- task: migrate-drop
- task: migrate-up
- task: seed
commitlint:
desc: "Lint commit message for conventional commit structure"
cmd: docker-compose --profile "scripts" run -T --rm commitizen cz check {{.CLI_ARGS}}
commit:
desc: "Interactive builder for conventional commits"
cmd: docker-compose --profile "scripts" run -i --rm commitizen cz commit {{.CLI_ARGS}}
5 changes: 5 additions & 0 deletions commitizen.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM ghcr.io/astral-sh/uv:0.8.8-python3.9-alpine
RUN apk update && apk add git
RUN uv tool install commitizen
WORKDIR /app
CMD [ "cz" ]
9 changes: 9 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,12 @@ services:
- object-storage:minio
profiles:
- "scripts"
commitizen:
# This specifies the docker file/context to build for the api container
build:
context: .
dockerfile: commitizen.Dockerfile
volumes:
- .:/app
profiles:
- "scripts"
Loading