Skip to content

Commit a4108bc

Browse files
committed
feat(commit-message): add guidelines for writing commit messages
Add guidelines for writing cohesive and descriptive commit messages. The guidelines include starting with a short sentence in imperative form, followed by a more detailed explanation if necessary. The explanation should be less than 200 characters. Examples of well-written commit messages are also provided.
1 parent 6ad0029 commit a4108bc

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

src/main/kotlin/cc/unitmesh/devti/actions/vcs/CodeReviewAction.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ import com.intellij.vcs.log.VcsLogDataKeys
2626
import git4idea.repo.GitRepository
2727
import kotlinx.coroutines.runBlocking
2828
import org.changelog.CommitParser
29-
import java.nio.file.FileSystems
30-
import java.nio.file.PathMatcher
3129

3230
val githubUrlRegex: Regex = Regex("^(https?://|git://)?(www\\.)?github\\.com/[\\w-]+/[\\w-]+(/.*)?\$")
3331

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Write a cohesive yet descriptive commit message for a given diff.
2+
Make sure to include both information What was changed and Why.
3+
Start with a short sentence in imperative form, no more than 50 characters long.
4+
Then leave an empty line and continue with a more detailed explanation, if necessary.
5+
Explanation should have less than 200 characters.
6+
7+
examples:
8+
- fix(authentication): add password regex pattern
9+
- feat(storage): add new test cases
10+
- test(java): fix test case for user controller
11+
12+
Diff:
13+
14+
```diff
15+
${context.diff}
16+
```
17+

src/main/resources/genius/quick/quick-action.system.vm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ Generate a concise code snippet with no extra text, description, or comments.
22

33
The code should achieve the following task:
44

5+
${context.task}

src/main/resources/prompts/ai/design_api.vm

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)