fix(prompt): Add explicit GitHub/GitLab/Slack push instructions to templates (#10290)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Xingyao Wang
2025-08-13 14:44:06 -04:00
committed by GitHub
parent 368a0248e3
commit e39bf80239
7 changed files with 48 additions and 14 deletions

View File

@@ -12,6 +12,11 @@ A comment on the issue has been addressed to you.
When you're done, make sure to When you're done, make sure to
1. Re-read the issue title, body, and comments and make sure that you have successfully implemented all requirements. 1. Re-read the issue title, body, and comments and make sure that you have successfully implemented all requirements.
2. Use the `create_pr` tool to open a new PR 2. Create a new branch using `openhands/` as a prefix (e.g `openhands/update-readme`)
3. Name the branch using `openhands/` as a prefix (e.g `openhands/update-readme`) 3. Commit your changes with a clear commit message
4. The PR description should mention that it "fixes" or "closes" the issue number 4. Push the branch to GitHub
5. Use the `create_pr` tool to open a new PR
6. 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

View File

@@ -7,5 +7,11 @@ Your tasking is to fix an issue in your repository. Do the following
When you're done, make sure to When you're done, make sure to
1. Use the `create_pr` tool to open a new PR 1. Create a new branch with a descriptive name (e.g., `openhands/fix-issue-123`)
2. The PR description should mention that it "fixes" or "closes" the issue number 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

View File

@@ -17,5 +17,6 @@ If it's a question:
If it requests a code update: If it requests a code update:
1. Modify the code accordingly in the current branch 1. Modify the code accordingly in the current branch
2. Push the changes to update the PR 2. Commit your changes with a clear commit message
3. DO NOT leave any comments on the PR 3. Push the changes to GitHub to update the PR
4. DO NOT leave any comments on the PR

View File

@@ -12,6 +12,11 @@ A comment on the issue has been addressed to you.
When you're done, make sure to When you're done, make sure to
1. Re-read the issue title, body, and comments and make sure that you have successfully implemented all requirements. 1. Re-read the issue title, body, and comments and make sure that you have successfully implemented all requirements.
2. Use the `create_mr` tool to open a new MR 2. Create a new branch using `openhands/` as a prefix (e.g `openhands/update-readme`)
3. Name the branch using `openhands/` as a prefix (e.g `openhands/update-readme`) 3. Commit your changes with a clear commit message
4. The MR description should mention that it "fixes" or "closes" the issue number 4. Push the branch to GitLab
5. Use the `create_mr` tool to open a new MR
6. The MR description should:
- Follow the repository's MR template (check `.gitlab/merge_request_templates/` or `.github/pull_request_template.md` if it exists)
- Mention that it "fixes" or "closes" the issue number
- Include all required sections from the template

View File

@@ -7,5 +7,11 @@ Your tasking is to fix an issue in your repository. Do the following
When you're done, make sure to When you're done, make sure to
1. Use the `create_mr` tool to open a new MR 1. Create a new branch with a descriptive name (e.g., `openhands/fix-issue-123`)
2. The MR description should mention that it "fixes" or "closes" the issue number 2. Commit your changes with a clear commit message
3. Push the branch to GitLab
4. Use the `create_mr` tool to open a new MR
5. The MR description should:
- Follow the repository's MR template (check `.gitlab/merge_request_templates/` or `.github/pull_request_template.md` if it exists)
- Mention that it "fixes" or "closes" the issue number
- Include all required sections from the template

View File

@@ -17,5 +17,6 @@ If it's a question:
If it requests a code update: If it requests a code update:
1. Modify the code accordingly in the current branch 1. Modify the code accordingly in the current branch
2. Push the changes to update the MR 2. Commit your changes with a clear commit message
3. DO NOT leave any comments on the MR 3. Push the changes to GitLab to update the MR
4. DO NOT leave any comments on the MR

View File

@@ -5,3 +5,13 @@ These are a list of text messages attached in order of most recent.
{{ message }} {{ message }}
{% if not loop.last %}\n\n{% endif %} {% if not loop.last %}\n\n{% endif %}
{% endfor %} {% endfor %}
If you made code changes, when you're done make sure to:
1. Commit your changes with a clear commit message
2. **Ask the user in your summary** whether they want you to:
- Push the changes to a new branch and create a pull request (following the repository's PR template if it exists)
- Just keep the changes local for now
- Any other specific Git workflow they prefer
Do NOT automatically push or create pull requests without explicit user confirmation.