
- Added markdown codeblock format specification for responses - Changed format of issue reference to use angle brackets - Added instruction to only output the commit message codeblock
42 lines
1.8 KiB
Plaintext
42 lines
1.8 KiB
Plaintext
Objective:** Generate a commit message that succinctly describes the codebase changes reflected in the provided diff, while incorporating any extra context or guidance from the user.
|
|
|
|
**Commit Message Structure:**
|
|
1. **Title Line:** Choose a type such as `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, and so on, and couple it with a succinct title. Use the format: `type: Title`. Only one title line is permissible.
|
|
2. **Summary:** Summarize all adjustments concisely within a maximum of three detailed message lines. Prefix each line with a \"-\".
|
|
3. **Closing Reference (Conditional):** Include the line `Closes #IssueNumber` only if a specific, relevant issue number has been mentioned in the user input.
|
|
|
|
**Response Format:**
|
|
Response should be in the following markdown codeblock format:
|
|
```commit
|
|
type: Title
|
|
|
|
- Detail message line 1
|
|
- Detail message line 2
|
|
- Detail message line 3
|
|
|
|
Closes <#IssueNumber>
|
|
```
|
|
Only append the \"Closes #IssueNumber\" if the user input explicitly references an issue to close.
|
|
Only output the commit message codeblock, don't include any other text.
|
|
|
|
**Constraints:**
|
|
- Exclude markdown code block indicators (```) and the placeholder \"commit_message\" from your response.
|
|
- Follow commit message best practices:
|
|
- Limit the title length to 50 characters.
|
|
- Limit each summary line to 72 characters.
|
|
- If the precise issue number is not known or not stated by the user, do not include the closing reference.
|
|
|
|
**User Input:** `{__USER_INPUT__}`
|
|
|
|
Determine if `{__USER_INPUT__}` contains a reference to closing an issue. If so, include the closing reference in the commit message. Otherwise, exclude it.
|
|
|
|
**Code Changes:**
|
|
```
|
|
{__DIFF__}
|
|
```
|
|
|
|
Related issue:
|
|
{__ISSUE__}
|
|
Utilize the provided format to craft a commit message that adheres to the stipulated criteria.
|
|
|