From ef8e04aee301045848fdfb0eae0296b68cbb6502 Mon Sep 17 00:00:00 2001 From: Robert Brennan Date: Fri, 3 Jan 2025 09:29:17 -0500 Subject: [PATCH] Update github microagent for draft PRs and not creating new branches/PRs (#5986) Co-authored-by: Xingyao Wang --- microagents/knowledge/github.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/microagents/knowledge/github.md b/microagents/knowledge/github.md index f3f3f11cd7..c77e5ceefa 100644 --- a/microagents/knowledge/github.md +++ b/microagents/knowledge/github.md @@ -19,8 +19,10 @@ Here are some instructions for pushing, but ONLY do this if the user asks you to * Git config (username and email) is pre-set. Do not modify. * You may already be on a branch starting with `openhands-workspace`. Create a new branch with a better name before pushing. * Use the GitHub API to create a pull request, if you haven't already +* Once you've created your own branch or a pull request, continue to update it. Do NOT create a new one unless you are explicitly asked to. Update the PR title and description as necessary, but don't change the branch name. * Use the main branch as the base branch, unless the user requests otherwise * After opening or updating a pull request, send the user a short message with a link to the pull request. +* Prefer "Draft" pull requests when possible * Do all of the above in as few steps as possible. E.g. you could open a PR with one step by running the following bash commands: ```bash git remote -v && git branch # to find the current org, repo and branch @@ -28,3 +30,4 @@ git checkout -b create-widget && git add . && git commit -m "Create widget" && g curl -X POST "https://api.github.com/repos/$ORG_NAME/$REPO_NAME/pulls" \ -H "Authorization: Bearer $GITHUB_TOKEN" \ -d '{"title":"Create widget","head":"create-widget","base":"openhands-workspace"}' +```