Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e06c42c
use grok to generate commit msg
DFanso Mar 2, 2025
b361b64
Delete .env
DFanso Mar 2, 2025
d733ac6
Delete commit-helper.json
DFanso Mar 2, 2025
1d66fd1
Update setup and API integration
DFanso Mar 2, 2025
d7f102f
Merge branch 'main' of https://github.com/DFanso/commit-msg
DFanso Mar 2, 2025
450065c
Update: README and grok.go for path consistency
DFanso Mar 2, 2025
82b19e3
Feat: Add auto-setup for current directory and new repos
DFanso Mar 2, 2025
f0c7a63
Update: Clarify commit message guidelines in grok.go
DFanso Mar 2, 2025
10b44d4
Update: Simplify API key handling and add to README
DFanso Mar 2, 2025
8173440
Update README with new command examples for current directory
DFanso Mar 2, 2025
52ce7a2
Update: Clarify README and commit message guidelines
DFanso Mar 2, 2025
08e8bce
Update: Upgrade GitHub Actions to latest versions for better reliabil…
DFanso Mar 2, 2025
11f1c4e
Update: Enhance CI/CD with auto-tagging and improved artifact handling
DFanso Mar 2, 2025
49cb389
Refactor: Simplify CI/CD workflow and improve tag handling
DFanso Mar 2, 2025
965782f
Update: Upgrade Go to 1.23 and streamline CI/CD workflow
DFanso Mar 2, 2025
146c2e5
Update: Enhance README with detailed setup, usage, and sample output …
DFanso Mar 2, 2025
a10c56c
Update README.md
DFanso Mar 3, 2025
146b446
Feat: Add Gemini LLM support for commit messages
EmpiteLeo Mar 4, 2025
a7ab61e
Refactor: Move commit prompt to types package
EmpiteLeo Mar 4, 2025
3592033
Merge branch 'main' of https://github.com/DFanso/commit-msg
DFanso Mar 4, 2025
d816678
Update: Clarify LLM setup instructions in README
DFanso Mar 4, 2025
c0428f0
Docs: Update README with project description
DFanso Mar 4, 2025
0f966b2
Docs: Update README with download instructions
DFanso Mar 4, 2025
7d8aa34
Docs: Update README with setup and download instructions
DFanso Mar 4, 2025
5a6d5b9
Refactor: Simplify main.go and update Grok API endpoint
DFanso Mar 5, 2025
dae3092
Remove: Delete config.go as configuration handling is refactored
DFanso Mar 5, 2025
e34d0fd
Update: Clarify README usage with dynamic path
DFanso Mar 5, 2025
4ffe2f8
Update: Simplify README setup command for dynamic paths
DFanso Mar 5, 2025
50c7f6e
Update README.md
DFanso Mar 11, 2025
7010262
Update: Switch Grok model to grok-3-mini-fast-beta
DFanso Apr 19, 2025
4a27d91
Merge branch 'main' of https://github.com/DFanso/commit-msg
DFanso Apr 19, 2025
1d2132e
Update README.md to include Hacktoberfest 2025 participation and enha…
DFanso Oct 2, 2025
0ba27a2
Added LLM type interface
tobias-kuendig Oct 2, 2025
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
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug Report
about: Create a report to help us improve
title: '[BUG] '
labels: bug
assignees: ''
---

## Bug Description
A clear and concise description of what the bug is.

## Steps to Reproduce
1. Set environment variable '...'
2. Run command '....'
3. Observe error '....'

## Expected Behavior
A clear and concise description of what you expected to happen.

## Actual Behavior
What actually happened.

## Environment
- OS: [e.g., Windows 11, macOS 14, Ubuntu 22.04]
- Go Version: [e.g., 1.23.4]
- commit-msg Version: [e.g., latest from main]
- LLM Provider: [Gemini or Grok]

## Additional Context
Add any other context about the problem here, such as:
- Error messages
- Screenshots
- Configuration files

## Possible Solution
If you have suggestions on how to fix the bug, please share them here.

29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Feature Request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''
---

## Feature Description
A clear and concise description of the feature you'd like to see.

## Problem It Solves
Describe the problem this feature would solve. Ex. I'm always frustrated when [...]

## Proposed Solution
A clear and concise description of what you want to happen.

## Alternative Solutions
Describe any alternative solutions or features you've considered.

## Use Case
Describe how this feature would be used and who would benefit from it.

## Additional Context
Add any other context, mockups, or screenshots about the feature request here.

## Implementation Ideas
If you have thoughts on how this could be implemented, please share them here.

61 changes: 61 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## Description
<!-- Provide a clear and concise description of your changes -->

## Type of Change
<!-- Mark the relevant option with an 'x' -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please describe):

## Related Issue
<!-- Link to the issue this PR addresses -->
Fixes #(issue number)

## Changes Made
<!-- List the specific changes made in this PR -->

-
-
-

## Testing
<!-- Describe the tests you ran to verify your changes -->

- [ ] Tested with Gemini API
- [ ] Tested with Grok API
- [ ] Tested on Windows
- [ ] Tested on Linux
- [ ] Tested on macOS
- [ ] Added/updated tests (if applicable)

## Checklist
<!-- Mark completed items with an 'x' -->

- [ ] My code follows the project's code style
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings or errors
- [ ] I have tested this in a real Git repository
- [ ] I have read the [CONTRIBUTING.md](../CONTRIBUTING.md) guidelines

## Screenshots (if applicable)
<!-- Add screenshots to help explain your changes -->

## Additional Notes
<!-- Add any other context about the PR here -->

---

## For Hacktoberfest Participants
<!-- If this is a Hacktoberfest contribution, please check the box below -->

- [ ] This PR is submitted as part of Hacktoberfest 2025

Thank you for your contribution! 🎉

185 changes: 185 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
name: Build and Release

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main

jobs:
auto-tag:
name: Auto Tag
runs-on: ubuntu-latest
# Only run on main branch pushes, not on tag pushes or PRs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
outputs:
new_tag: ${{ steps.tag_version.outputs.new_tag }}
tag_created: ${{ steps.tag_version.outputs.new_tag != '' }}
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Auto Tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: patch
create_annotated_tag: true
tag_prefix: v

- name: Print Tag Info
run: |
echo "New tag: ${{ steps.tag_version.outputs.new_tag }}"
echo "Tag created: ${{ steps.tag_version.outputs.new_tag != '' }}"

build:
name: Build Go Binary
runs-on: ${{ matrix.os }}
needs: auto-tag
# Always run build, even if auto-tag was skipped (e.g., for tag pushes)
if: always() && (needs.auto-tag.result == 'success' || needs.auto-tag.result == 'skipped')
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
artifact_name: commit
asset_name: commit-linux-amd64
- os: windows-latest
artifact_name: commit.exe
asset_name: commit-windows-amd64.exe
- os: macos-latest
artifact_name: commit
asset_name: commit-macos-amd64

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23' # Use the appropriate Go version for your project

- name: Get dependencies
run: go mod download

- name: Build
run: |
if [ "${{ matrix.os }}" = "windows-latest" ]; then
go build -v -o ${{ matrix.artifact_name }} -ldflags="-s -w" ./src
else
go build -v -o ${{ matrix.artifact_name }} -ldflags="-s -w" ./src
fi
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset_name }}
path: ${{ matrix.artifact_name }}

package:
name: Package Binaries
needs: [auto-tag, build]
runs-on: ubuntu-latest
# Always run after build
if: always() && needs.build.result == 'success'
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download Linux Binary
uses: actions/download-artifact@v4
with:
name: commit-linux-amd64
path: ./binaries/linux

- name: Download Windows Binary
uses: actions/download-artifact@v4
with:
name: commit-windows-amd64.exe
path: ./binaries/windows

- name: Download macOS Binary
uses: actions/download-artifact@v4
with:
name: commit-macos-amd64
path: ./binaries/macos

- name: Show downloaded files
run: |
find ./binaries -type f

- name: Make binaries executable
run: |
chmod +x ./binaries/linux/commit
chmod +x ./binaries/macos/commit

- name: Create packages
run: |
mkdir -p ./packages

# Package Linux binary
tar -C ./binaries/linux -czf ./packages/commit-linux-amd64.tar.gz commit

# Package Windows binary
zip -j ./packages/commit-windows-amd64.zip ./binaries/windows/commit.exe

# Package macOS binary
tar -C ./binaries/macos -czf ./packages/commit-macos-amd64.tar.gz commit

# List created packages
ls -la ./packages/

- name: Upload packages as artifacts
uses: actions/upload-artifact@v4
with:
name: release-packages
path: ./packages/*

release:
name: Create Release
needs: [auto-tag, build, package]
# Run if a tag was created by auto-tag or this is a tag push
if: (needs.auto-tag.outputs.new_tag != '') || (github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download packages
uses: actions/download-artifact@v4
with:
name: release-packages
path: ./packages

- name: List package files
run: |
ls -la ./packages/

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.auto-tag.outputs.new_tag != '' && needs.auto-tag.outputs.new_tag || github.ref_name }}
name: Release ${{ needs.auto-tag.outputs.new_tag != '' && needs.auto-tag.outputs.new_tag || github.ref_name }}
files: |
./packages/commit-linux-amd64.tar.gz
./packages/commit-windows-amd64.zip
./packages/commit-macos-amd64.tar.gz
draft: false
prerelease: false
generate_release_notes: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@

# Go workspace file
go.work
.env
commit-helper.json
HACKTOBERFEST_SETUP.md
54 changes: 54 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Hacktoberfest Values

This project participates in Hacktoberfest and adheres to its core values:

* **Everyone is welcome** - We welcome participants from all backgrounds and skill levels
* **Quantity is fun, quality is key** - We prioritize meaningful contributions over volume
* **Short-term action, long-term impact** - We respect the time and effort of all contributors

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team through GitHub issues. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq

Loading