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
4 changes: 2 additions & 2 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ jobs:
- name: Build
run: |
if [ "${{ matrix.os }}" = "windows-latest" ]; then
go build -v -o ${{ matrix.artifact_name }} -ldflags="-s -w" ./src
go build -v -o ${{ matrix.artifact_name }} -ldflags="-s -w" ./cmd/commit-msg
else
go build -v -o ${{ matrix.artifact_name }} -ldflags="-s -w" ./src
go build -v -o ${{ matrix.artifact_name }} -ldflags="-s -w" ./cmd/commit-msg
fi
shell: bash

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ Improving documentation is always appreciated:
3. Run the application:

```bash
go run src/main.go .
go run cmd/commit-msg/main.go .
```

4. Build the executable:
```bash
go build -o commit.exe src/main.go
go build -o commit.exe cmd/commit-msg/main.go
```

### Testing Your Changes
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

Below is a sample execution of `commit-msg`:

![Commit-msg GIF](commit.gif)
![Commit-msg GIF](assets/commit.gif)

Before running the application, ensure you have set the system environment variables. and add commit.exe to path variables (same for linux macOS)

Expand Down Expand Up @@ -102,7 +102,7 @@ cd commit-msg
go mod download

# Build the executable
go build -o commit src/main.go
go build -o commit cmd/commit-msg/main.go

# (Optional) Install to GOPATH
go install
Expand All @@ -123,7 +123,7 @@ commit .
Or if running from source:

```bash
go run src/main.go .
go run cmd/commit-msg/main.go .
```

### Example Workflow
Expand Down
File renamed without changes
File renamed without changes
16 changes: 8 additions & 8 deletions src/main.go → cmd/commit-msg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import (
"os"

"github.com/atotto/clipboard"
"github.com/dfanso/commit-msg/src/chatgpt"
"github.com/dfanso/commit-msg/src/claude"
"github.com/dfanso/commit-msg/src/gemini"
"github.com/dfanso/commit-msg/src/grok"
"github.com/dfanso/commit-msg/src/internal/display"
"github.com/dfanso/commit-msg/src/internal/git"
"github.com/dfanso/commit-msg/src/internal/stats"
"github.com/dfanso/commit-msg/src/types"
"github.com/dfanso/commit-msg/internal/chatgpt"
"github.com/dfanso/commit-msg/internal/claude"
"github.com/dfanso/commit-msg/internal/display"
"github.com/dfanso/commit-msg/internal/gemini"
"github.com/dfanso/commit-msg/internal/git"
"github.com/dfanso/commit-msg/internal/grok"
"github.com/dfanso/commit-msg/internal/stats"
"github.com/dfanso/commit-msg/pkg/types"
"github.com/pterm/pterm"
)

Expand Down
2 changes: 1 addition & 1 deletion src/chatgpt/chatgpt.go → internal/chatgpt/chatgpt.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
openai "github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/option"

"github.com/dfanso/commit-msg/src/types"
"github.com/dfanso/commit-msg/pkg/types"
)

func GenerateCommitMessage(config *types.Config, changes string, apiKey string) (string, error) {
Expand Down
2 changes: 1 addition & 1 deletion src/claude/claude.go → internal/claude/claude.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"net/http"

"github.com/dfanso/commit-msg/src/types"
"github.com/dfanso/commit-msg/pkg/types"
)

type ClaudeRequest struct {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/gemini/gemini.go → internal/gemini/gemini.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/google/generative-ai-go/genai"
"google.golang.org/api/option"

"github.com/dfanso/commit-msg/src/types"
"github.com/dfanso/commit-msg/pkg/types"
)

func GenerateCommitMessage(config *types.Config, changes string, apiKey string) (string, error) {
Expand Down
6 changes: 3 additions & 3 deletions src/internal/git/operations.go → internal/git/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"path/filepath"
"strings"

"github.com/dfanso/commit-msg/src/internal/scrubber"
"github.com/dfanso/commit-msg/src/internal/utils"
"github.com/dfanso/commit-msg/src/types"
"github.com/dfanso/commit-msg/internal/scrubber"
"github.com/dfanso/commit-msg/internal/utils"
"github.com/dfanso/commit-msg/pkg/types"
)

// IsRepository checks if a directory is a git repository
Expand Down
2 changes: 1 addition & 1 deletion src/grok/grok.go → internal/grok/grok.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/http"
"time"

"github.com/dfanso/commit-msg/src/types"
"github.com/dfanso/commit-msg/pkg/types"
)

func GenerateCommitMessage(config *types.Config, changes string, apiKey string) (string, error) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"os/exec"
"strings"

"github.com/dfanso/commit-msg/src/internal/display"
"github.com/dfanso/commit-msg/src/internal/utils"
"github.com/dfanso/commit-msg/src/types"
"github.com/dfanso/commit-msg/internal/display"
"github.com/dfanso/commit-msg/internal/utils"
"github.com/dfanso/commit-msg/pkg/types"
)

// GetFileStatistics collects comprehensive file statistics from Git
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading