-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
37 lines (30 loc) · 891 Bytes
/
Copy pathexample.py
File metadata and controls
37 lines (30 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python3
"""
Example usage of commit_gen.py
"""
# This example demonstrates how the tool works
# 1. Make some changes to your repository
# 2. Stage them with git add
# 3. Run the tool:
#
# python commit_gen.py
#
# The tool will analyze your changes and suggest a commit message.
# Example scenarios:
# Scenario 1: Adding a new feature
# $ git add src/auth/login.py
# $ python commit_gen.py
# Output: feat(auth): add login functionality
# Scenario 2: Fixing a bug
# $ git add src/api/users.py
# $ python commit_gen.py
# Output: fix(api): resolve issue in users
# Scenario 3: Updating documentation
# $ git add README.md docs/guide.md
# $ python commit_gen.py
# Output: docs: update documentation
# Scenario 4: Refactoring code
# $ git add src/utils/helpers.py
# $ git rm src/utils/old_helpers.py
# $ python commit_gen.py
# Output: refactor(utils): restructure helpers