You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* update pre-commit version, add conventional commit option
* update black version to 24.8.0
* feat: add conventional commit message generation feature
* feat: refactor commit process to include error handling and push options
* refactor: refactor git push handling into a utility function
* remove comments from conventional_commit_handler.py
* feat: add command to generate conventional commit messages
* feat: add ai suggestions for commit type selection and handling
* docs(docs for conventional command): update command description in README.md
* update pre-commit hooks version, suggest commit scope
* docs: remove example command from README documentation
* refactor: add blank line before available commit types
* refactor(cli): refactor ai commit type and scope suggestion logic
* refactor(cli): refactor git push handling into separate function
* remove commented code lines from conventional_commit_handler
You are a software engineer reviewing code changes to classify them according to conventional commit standards.
10
+
You will be provided with a set of code changes in diff format.
11
+
12
+
Your task is to analyze the changes and determine the most appropriate conventional commit type.
13
+
Choose ONE type from the following options:
14
+
- feat: New feature
15
+
- fix: Bug fix
16
+
- docs: Documentation changes
17
+
- style: Formatting changes
18
+
- refactor: Code refactoring
19
+
- perf: Performance improvements
20
+
- test: Adding or modifying tests
21
+
- chore: Maintenance tasks
22
+
23
+
Respond with ONLY the type (e.g., "feat", "fix", etc.) without any additional text or explanation.
24
+
"""
25
+
elifclassify_scope:
26
+
COMMIT_MSG_SYSTEM_MESSAGE=f"""
27
+
You are a software engineer reviewing code changes to suggest an appropriate scope for a conventional commit.
28
+
You will be provided with a set of code changes in diff format.
29
+
30
+
Your task is to analyze the changes and suggest a concise, meaningful scope that indicates what part of the codebase or functionality is being modified.
31
+
Good scopes are typically:
32
+
- Short (1-3 words)
33
+
- Descriptive of the component or feature being changed
34
+
- Lowercase with no spaces (use hyphens if needed)
35
+
36
+
Examples of good scopes:
37
+
- "auth" for authentication changes
38
+
- "user-profile" for user profile features
39
+
- "api" for API-related changes
40
+
- "docs" for documentation
41
+
- "deps" for dependency updates
42
+
- "ui" for user interface changes
43
+
44
+
If you can't determine a meaningful scope, respond with "none".
45
+
Respond with ONLY the suggested scope without any additional text or explanation.
46
+
"""
47
+
elifconventional:
48
+
COMMIT_MSG_SYSTEM_MESSAGE=f"""
49
+
You are a software engineer reviewing code changes.
50
+
You will be provided with a set of code changes in diff format.
51
+
52
+
Your task is to write a concise commit message body that summarizes the changes. This will be used in a conventional commit format.
53
+
54
+
These are your requirements for the commit message body:
55
+
- Write in the imperative mood (e.g., "add feature" not "added feature")
56
+
- Focus only on the description part - do NOT include type prefixes like "feat:" or "fix:" as these will be added separately
57
+
- Be specific but concise about what was changed
58
+
- You don't need to add any punctuation or capitalization
59
+
- Your response cannot be more than {max_length} characters
60
+
"""
61
+
else:
62
+
COMMIT_MSG_SYSTEM_MESSAGE=f"""
8
63
Your a software engineer and you are reviewing a set of code changes.
9
64
You will be provided with a set of code changes in diff format.
0 commit comments