Skip to content

Commit bfb45f4

Browse files
committed
feat: rewrite prompt and make it better
1 parent bdabd4b commit bfb45f4

File tree

1 file changed

+38
-21
lines changed

1 file changed

+38
-21
lines changed

src/template.ts

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,44 @@ Please suggest 10 commit messages, given the following diff:
55
{{diff}}
66
\`\`\`
77
8-
**Criteria:**
9-
10-
1. **Format:** Each commit message must follow the conventional commits format, which is \`<type>: <description>\`.
11-
2. **Relevance:** Avoid mentioning a module name unless it's directly relevant to the change.
12-
3. **Enumeration:** List the commit messages from 1 to 10.
13-
4. **Clarity and Conciseness:** Each message should clearly and concisely convey the change made.
14-
15-
**Commit Message Examples:**
16-
17-
- fix: add password regex pattern
18-
- feat: add new test cases
19-
- style: remove unused imports
20-
- refactor: extract common code to \`utils/wait.ts\`
21-
22-
**Instructions:**
23-
24-
- Take a moment to understand the changes made in the diff.
25-
- Think about the impact of these changes on the project (e.g., bug fixes, new features, performance improvements, code refactoring, documentation updates). It's critical to my career you abstract the changes to a higher level and not just describe the code changes.
26-
- Generate commit messages that accurately describe these changes, ensuring they are helpful to someone reading the project's history.
27-
- Remember, a well-crafted commit message can significantly aid in the maintenance and understanding of the project over time.
28-
- If multiple changes are present, make sure you capture them all in each commit message.
8+
You have to user Semantic Commit Messages way of writing commit messages.
9+
Format: <type>(<scope>): <subject>
10+
- <type> is mandatory and specifies the type of commit.
11+
- <scope> is optional and specifies the place of the commit change.
12+
- <subject> is mandatory and contains succinct description of the change.
13+
- Any line of the commit message cannot be longer 100 characters!
14+
# Types
15+
- feat: A new feature
16+
- fix: A bug fix
17+
- docs: Documentation only changes
18+
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
19+
- refactor: A code change that neither fixes a bug nor adds a feature
20+
- perf: A code change that improves performance
21+
- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
22+
- test: Adding missing tests
23+
- chore: anything else
24+
# example
25+
- feat(ng-list): allow custom separator
26+
- fix(ng-list): handle empty arrays
27+
- docs(ng-list): update readme
28+
- style(ng-list): remove whitespace
29+
- refactor(ng-list): use helper function for filter
30+
- perf(ng-list): optimize filter
31+
- ci(ng-list): add Travis CI
32+
- test(ng-list): add missing tests
33+
- chore(ng-list): change linter to eslint
34+
# more example
35+
also you can write commit like this
36+
chore: add Oyster build script
37+
docs: explain hat wobble
38+
feat: add beta sequence
39+
fix: remove broken confirmation message
40+
refactor: share logic between 4d3d3d3 and flarhgunnstow
41+
style: convert tabs to spaces
42+
test: ensure Tayne retains clothing
43+
44+
# Notes
45+
you have to be creative and think about the best commit message that can describe the changes in the diff. like if you have a diff that changes the color of a button from red to blue, you can write a commit message like this: style(button): change button color from red to blue. Moreover, you have pick simple words easy to understand.
2946
3047
Keep in mind you will suggest 10 commit messages. Only 1 will be used. It's better to push yourself (esp to synthesize to a higher level) and maybe wrong about some of the 10 commits because only one needs to be good. I'm looking for your best commit, not the best average commit. It's better to cover more scenarios than include a lot of overlap.
3148

0 commit comments

Comments
 (0)