Skip to content

Commit 0a48e3f

Browse files
committed
feat: initial release of git-msg
AI-assisted git commit message generator with multi-provider LLM support (OpenAI, Anthropic, Gemini, Ollama), interactive TUI review, customisable Jinja2-style prompt templates, secure keychain credential storage, and git hook lifecycle management.
0 parents  commit 0a48e3f

93 files changed

Lines changed: 5890 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: 🐛 Bug Report
2+
description: Report a bug or unexpected behavior
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to report a bug! Please fill out the form below.
10+
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: Description
15+
description: A clear description of what the bug is.
16+
placeholder: What happened?
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: steps
22+
attributes:
23+
label: Steps to Reproduce
24+
description: Steps to reproduce the behavior.
25+
placeholder: |
26+
1. Run `git-msg generate --dry-run`
27+
2. See error...
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: expected
33+
attributes:
34+
label: Expected Behavior
35+
description: What did you expect to happen?
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: actual
41+
attributes:
42+
label: Actual Behavior
43+
description: What actually happened?
44+
validations:
45+
required: true
46+
47+
- type: input
48+
id: version
49+
attributes:
50+
label: git-msg Version
51+
description: Output of `git-msg --version`
52+
placeholder: "v0.1.0"
53+
validations:
54+
required: true
55+
56+
- type: dropdown
57+
id: os
58+
attributes:
59+
label: Operating System
60+
options:
61+
- macOS
62+
- Linux
63+
validations:
64+
required: true
65+
66+
- type: textarea
67+
id: logs
68+
attributes:
69+
label: Logs / Error Output
70+
description: Any relevant error messages or logs.
71+
render: shell
72+
73+
- type: textarea
74+
id: additional
75+
attributes:
76+
label: Additional Context
77+
description: Any other context about the problem.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 💬 Discussions
4+
url: https://github.com/madstone-tech/git-msg/discussions
5+
about: Ask questions and discuss ideas
6+
- name: 📖 Documentation
7+
url: https://github.com/madstone-tech/git-msg#readme
8+
about: Read the documentation
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: ✨ Feature Request
2+
description: Suggest a new feature or enhancement
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for suggesting a feature! Please describe your idea below.
10+
11+
- type: textarea
12+
id: problem
13+
attributes:
14+
label: Problem Statement
15+
description: What problem does this feature solve?
16+
placeholder: I'm always frustrated when...
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: solution
22+
attributes:
23+
label: Proposed Solution
24+
description: Describe the solution you'd like.
25+
placeholder: It would be great if git-msg could...
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: alternatives
31+
attributes:
32+
label: Alternatives Considered
33+
description: Any alternative solutions or workarounds you've considered?
34+
35+
- type: dropdown
36+
id: interface
37+
attributes:
38+
label: Which area would this affect?
39+
multiple: true
40+
options:
41+
- generate (commit message generation)
42+
- config (configuration management)
43+
- prompt (template management)
44+
- hook (git hook lifecycle)
45+
- LLM provider (new provider or provider behaviour)
46+
- Setup wizard
47+
- Other
48+
49+
- type: textarea
50+
id: additional
51+
attributes:
52+
label: Additional Context
53+
description: Any other context, mockups, or examples.

.github/workflows/ci.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: Test
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: '1.26'
23+
24+
- name: Go mod tidy
25+
run: go mod tidy
26+
27+
- name: Go mod verify
28+
run: go mod verify
29+
30+
- name: Run tests
31+
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
32+
33+
- name: Upload coverage
34+
uses: codecov/codecov-action@v4
35+
with:
36+
files: ./coverage.txt
37+
fail_ci_if_error: false
38+
39+
build:
40+
name: Build
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
46+
- name: Set up Go
47+
uses: actions/setup-go@v5
48+
with:
49+
go-version: '1.26'
50+
51+
- name: Build
52+
run: go build -v .
53+
54+
lint:
55+
name: Lint
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
61+
- name: Set up Go
62+
uses: actions/setup-go@v5
63+
with:
64+
go-version: '1.26'
65+
66+
- name: golangci-lint
67+
uses: golangci/golangci-lint-action@v7
68+
with:
69+
version: v2.11.3
70+
71+
constitution:
72+
name: Constitution Audit
73+
runs-on: ubuntu-latest
74+
steps:
75+
- name: Checkout
76+
uses: actions/checkout@v4
77+
78+
- name: Run constitution audit
79+
run: |
80+
chmod +x scripts/audit-constitution.sh
81+
./scripts/audit-constitution.sh
82+
continue-on-error: true
83+
84+
- name: Enforce constitution (fail on violations)
85+
run: |
86+
if ./scripts/audit-constitution.sh; then
87+
echo "✅ All packages comply with the constitution"
88+
exit 0
89+
else
90+
echo "❌ Constitution violations detected — see output above"
91+
echo " Principle II: cmd/*.go Run() must not import cobra"
92+
echo " Principle VII: internal/ui must not import internal/*"
93+
echo " Principle VII: internal/llm must not import internal/config or internal/secret"
94+
echo " Principle VII: internal/hook must not call exec.Command directly"
95+
echo " Paths: no package outside internal/dirs may call os.UserConfigDir()"
96+
exit 1
97+
fi

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
12+
jobs:
13+
goreleaser:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version: '1.26'
25+
26+
- name: Run GoReleaser
27+
uses: goreleaser/goreleaser-action@v6
28+
with:
29+
distribution: goreleaser
30+
version: '~> v2'
31+
args: release --clean
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Binaries
2+
bin/
3+
*.exe
4+
*.test
5+
*.out
6+
7+
# Go build cache
8+
vendor/
9+
10+
# Test coverage
11+
coverage.out
12+
coverage.html
13+
14+
# IDE / editor
15+
.vscode/
16+
.idea/
17+
*.swp
18+
*.swo
19+
20+
# OS
21+
.DS_Store
22+
Thumbs.db
23+
24+
# Environment
25+
.env
26+
.env.*
27+
28+
# Logs
29+
*.log
30+
31+
# Internal development tooling (local only)
32+
.opencode/
33+
.specify/
34+
specs/
35+
.claude/

.golangci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# golangci-lint configuration (v2)
2+
version: "2"
3+
4+
run:
5+
timeout: 5m
6+
tests: false
7+
8+
linters:
9+
enable:
10+
- govet
11+
- staticcheck
12+
- errcheck
13+
- ineffassign
14+
- unused
15+
- misspell
16+
disable:
17+
- exhaustive
18+
- exhaustruct
19+
- varnamelen
20+
- revive
21+
22+
formatters:
23+
enable:
24+
- gofmt

0 commit comments

Comments
 (0)