From 8799c0702736030130b7ff10ee3ae32f28ecd465 Mon Sep 17 00:00:00 2001 From: Xingyao Wang Date: Fri, 13 Mar 2026 14:35:22 +0800 Subject: [PATCH] fix: add PR creation instructions to V1 issue comment template and fix summary prompt (#13377) Co-authored-by: openhands --- .../resolver/github/issue_comment_initial_message.j2 | 11 +++++++++++ .../integrations/templates/resolver/summary_prompt.j2 | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/openhands/integrations/templates/resolver/github/issue_comment_initial_message.j2 b/openhands/integrations/templates/resolver/github/issue_comment_initial_message.j2 index 69b321aca4..95c9062c74 100644 --- a/openhands/integrations/templates/resolver/github/issue_comment_initial_message.j2 +++ b/openhands/integrations/templates/resolver/github/issue_comment_initial_message.j2 @@ -29,3 +29,14 @@ For reference, here are the previous comments on the issue: # Final Checklist Re-read the issue title, body, and comments and make sure that you have successfully implemented all requirements. + +Use the $GITHUB_TOKEN and GitHub APIs to + +1. Create a new branch using `openhands/` as a prefix (e.g `openhands/update-readme`) +2. Commit your changes with a clear commit message +3. Push the branch to GitHub +4. Use the `create_pr` tool to open a new PR +5. The PR description should: + - Follow the repository's PR template (check `.github/pull_request_template.md` if it exists) + - Mention that it "fixes" or "closes" the issue number + - Include all required sections from the template diff --git a/openhands/integrations/templates/resolver/summary_prompt.j2 b/openhands/integrations/templates/resolver/summary_prompt.j2 index 64f5442322..5250a6e519 100644 --- a/openhands/integrations/templates/resolver/summary_prompt.j2 +++ b/openhands/integrations/templates/resolver/summary_prompt.j2 @@ -2,8 +2,9 @@ Please send a final message summarizing your work. If you simply answered a question, this final message should re-state the answer to the question. -If you made changes, please first double-check the git diff, think carefully about the user's request(s), and check: +If you made changes, please think carefully about the user's request(s) and summarize: 1. whether the request has been completely addressed and all of the instructions have been followed faithfully (in checklist format if appropriate). 2. whether the changes are concise (if there are any extraneous changes not important to addressing the user's request they should be reverted). 3. focus only on summarizing new changes since your last summary, avoiding repetition of information already covered in previous summaries. -If the request has been addressed and the changes are concise, then push your changes to the remote branch and send a final message summarizing the changes. + +Please summarize in whatever language the user is using.