diff --git a/.openhands/microagents/repo.md b/.openhands/microagents/repo.md index 78cf1b1dd8..9fbe104109 100644 --- a/.openhands/microagents/repo.md +++ b/.openhands/microagents/repo.md @@ -87,8 +87,6 @@ VSCode Extension: If you are starting a pull request (PR), please follow the template in `.github/pull_request_template.md`. -If you need to add labels when opening a PR, check the existing labels defined on that repository and select from existing ones. Do not invent your own labels. - ## Implementation Details These details may or may not be useful for your current task. diff --git a/microagents/github.md b/microagents/github.md index d25b1a193b..449e8116f1 100644 --- a/microagents/github.md +++ b/microagents/github.md @@ -26,7 +26,6 @@ Here are some instructions for pushing, but ONLY do this if the user asks you to * Use the `create_pr` tool 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 -* If you need to add labels when opening a PR, check the existing labels defined on that repository and select from existing ones. Do not invent your own labels. * After opening or updating a pull request, send the user a short message with a link to the pull request. * Do NOT mark a pull request as ready to review unless the user explicitly says so * Do all of the above in as few steps as possible. E.g. you could push changes with one step by running the following bash commands: diff --git a/microagents/gitlab.md b/microagents/gitlab.md index ee9a4f88fb..eab6982056 100644 --- a/microagents/gitlab.md +++ b/microagents/gitlab.md @@ -26,7 +26,6 @@ Here are some instructions for pushing, but ONLY do this if the user asks you to * Use the `create_mr` tool to create a merge request, if you haven't already * Once you've created your own branch or a merge 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 -* If you need to add labels when opening a MR, check the existing labels defined on that repository and select from existing ones. Do not invent your own labels. * After opening or updating a merge request, send the user a short message with a link to the merge request. * Do all of the above in as few steps as possible. E.g. you could push changes with one step by running the following bash commands: ```bash diff --git a/openhands/server/routes/mcp.py b/openhands/server/routes/mcp.py index f5a7b17be7..6f917f3e4b 100644 --- a/openhands/server/routes/mcp.py +++ b/openhands/server/routes/mcp.py @@ -91,7 +91,10 @@ async def create_pr( body: Annotated[str | None, Field(description='PR body')], draft: Annotated[bool, Field(description='Whether PR opened is a draft')] = True, labels: Annotated[ - list[str] | None, Field(description='Labels to apply to the PR') + list[str] | None, + Field( + description='Optional labels to apply to the PR. If labels are provided, they must be selected from the repository’s existing labels. Do not invent new ones. If the repository’s labels are not known, fetch them first.' + ), ] = None, ) -> str: """Open a PR in GitHub""" @@ -161,7 +164,10 @@ async def create_mr( ], description: Annotated[str | None, Field(description='MR description')], labels: Annotated[ - list[str] | None, Field(description='Labels to apply to the MR') + list[str] | None, + Field( + description='Optional labels to apply to the MR. If labels are provided, they must be selected from the repository’s existing labels. Do not invent new ones. If the repository’s labels are not known, fetch them first.' + ), ] = None, ) -> str: """Open a MR in GitLab"""