Skip to content

Commit 9e2f0c1

Browse files
Initial commit: AI Commit tool
0 parents  commit 9e2f0c1

14 files changed

Lines changed: 1552 additions & 0 deletions

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# GitHub Sponsors configuration
2+
3+
github: himanshu231204
4+
custom: ["https://www.buymeacoffee.com/himanshu231204"]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: himanshu231204
7+
8+
---
9+
10+
## Bug Description
11+
A clear and concise description of the bug.
12+
13+
## Steps to Reproduce
14+
1. Go to '...'
15+
2. Run command '...'
16+
3. See error
17+
18+
## Expected Behavior
19+
What you expected to happen.
20+
21+
## Actual Behavior
22+
What actually happened.
23+
24+
## Screenshots
25+
If applicable, add screenshots to help explain your problem.
26+
27+
## Environment
28+
- OS: [e.g., Ubuntu 22.04, macOS 13, Windows 11]
29+
- Python Version: [e.g., 3.10.5]
30+
- AI Commit Version: [e.g., 0.1.0]
31+
- Ollama Version: [e.g., 0.1.14]
32+
- Model Used: [e.g., llama2]
33+
34+
## Additional Context
35+
Add any other context about the problem here.
36+
37+
## Error Logs
38+
```
39+
Paste any error messages or logs here
40+
```
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature for AI Commit
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: himanshu231204
7+
8+
---
9+
10+
## Feature Description
11+
A clear and concise description of the feature you'd like to see.
12+
13+
## Problem Statement
14+
What problem does this feature solve? Why do you need it?
15+
16+
## Proposed Solution
17+
How do you envision this feature working?
18+
19+
## Alternative Solutions
20+
Have you considered any alternative approaches?
21+
22+
## Use Cases
23+
Provide specific examples of how this feature would be used.
24+
25+
## Additional Context
26+
Add any other context, mockups, or examples about the feature request here.
27+
28+
## Would you like to implement this?
29+
- [ ] Yes, I'd like to work on this feature
30+
- [ ] No, but I can help test it
31+
- [ ] I'm just suggesting the idea

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Pull Request
2+
3+
## Description
4+
<!-- Provide a brief description of the changes in this PR -->
5+
6+
## Type of Change
7+
<!-- Mark the relevant option with an 'x' -->
8+
- [ ] Bug fix (non-breaking change that fixes an issue)
9+
- [ ] New feature (non-breaking change that adds functionality)
10+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
11+
- [ ] Documentation update
12+
- [ ] Code refactoring
13+
- [ ] Performance improvement
14+
- [ ] Other (please describe):
15+
16+
## Related Issues
17+
<!-- Link to related issues using #issue_number -->
18+
Closes #
19+
20+
## Changes Made
21+
<!-- List the specific changes made in this PR -->
22+
-
23+
-
24+
-
25+
26+
## Testing
27+
<!-- Describe the tests you ran to verify your changes -->
28+
- [ ] Tested on local machine
29+
- [ ] All existing tests pass
30+
- [ ] Added new tests (if applicable)
31+
- [ ] Tested with different Ollama models
32+
- [ ] Tested on multiple operating systems
33+
34+
## Screenshots/Output
35+
<!-- If applicable, add screenshots or command output to demonstrate the changes -->
36+
37+
## Checklist
38+
- [ ] My code follows the project's code style (PEP 8)
39+
- [ ] I have commented my code where necessary
40+
- [ ] I have updated the documentation (README, etc.)
41+
- [ ] My changes generate no new warnings
42+
- [ ] I have tested my changes thoroughly
43+
- [ ] All tests pass locally
44+
- [ ] I have added myself to contributors (if applicable)
45+
46+
## Additional Notes
47+
<!-- Any additional information that reviewers should know -->
48+
49+
---
50+
51+
Thank you for contributing to AI Commit! 🎉

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -r requirements.txt
29+
30+
- name: Lint with flake8
31+
run: |
32+
pip install flake8
33+
# Stop the build if there are Python syntax errors or undefined names
34+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35+
# Exit-zero treats all errors as warnings
36+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37+
38+
- name: Test import
39+
run: |
40+
python -c "from ai_commit import OllamaClient, GitService, CommitGenerator"
41+
42+
- name: Check script execution
43+
run: |
44+
python ai_commit.py --help || true
45+
46+
lint:
47+
runs-on: ubuntu-latest
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- name: Set up Python
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version: '3.11'
56+
57+
- name: Install dependencies
58+
run: |
59+
python -m pip install --upgrade pip
60+
pip install black isort flake8
61+
62+
- name: Check formatting with black
63+
run: black --check . || true
64+
65+
- name: Check import sorting with isort
66+
run: isort --check-only . || true

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Distribution / packaging
7+
.Python
8+
build/
9+
develop-eggs/
10+
dist/
11+
downloads/
12+
eggs/
13+
.eggs/
14+
lib/
15+
lib64/
16+
parts/
17+
sdist/
18+
var/
19+
wheels/
20+
*.egg-info/
21+
.installed.cfg
22+
*.egg
23+
24+
# Virtual environments
25+
.env
26+
.venv
27+
env/
28+
venv/
29+
ENV/
30+
31+
# IDE
32+
.vscode/
33+
.idea/
34+
*.swp
35+
*.swo
36+
37+
# OS
38+
.DS_Store
39+
Thumbs.db
40+
41+
# Testing
42+
.pytest_cache/
43+
.coverage
44+
htmlcov/

0 commit comments

Comments
 (0)