Skip to content

Commit

Permalink
utils.js: improve the prompt, and simplify the replacements
Browse files Browse the repository at this point in the history
  • Loading branch information
thypon authored May 9, 2024
1 parent 5ba473c commit a9711a0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Desired format:
### Description
<description_of_PR> // How does this PR change the codebase? What is the motivation for this change?
### Changes
<list_of_changes> // Describe the main changes in the PR, organizing them by filename
### Possible Issues
<list_of_issues> // Describe any other possible major non-security issues within this code. If there are none, omit this section.
### Security Hotspots
<list_of_security_hotspots> // Describe locations for possible vulnerabilities in the change, ordered by risk. Do not include a vulnerability unless it is likely to present a real security risk. If there are none, omit this section.
### Other Issues
<list_of_issues> // Describe any other major issues with this code such as license incompatibilities introduced by a dependency. If there are none, omit this section.
### Changes
<list_of_changes> // Describe the main changes in the PR, organizing them by filename
\n`

export async function explainPatchHelper (patchBody, owner, repo, models, debug, getResponse) {
Expand Down Expand Up @@ -44,7 +44,6 @@ export async function explainPatchHelper (patchBody, owner, repo, models, debug,
}

response = response.replaceAll('### Changes', '<details>\n<summary><i>Changes</i></summary>\n\n### Changes')
response = response.replaceAll('### Security Hotspots', '</details>\n\n### Security Hotspots')
response += `\n\n<!-- Generated by ${model} -->`
response += `</details>\n\n<!-- Generated by ${model} -->`
return response
}

0 comments on commit a9711a0

Please sign in to comment.