I was wondering how I can assign a github review t...
# questions
f
I was wondering how I can assign a github review to "openhands-agent"? I have the app installed and am trying to use the workflow here: https://github.com/OpenHands/software-agent-sdk/blob/main/examples/03_github_workflows/02_pr_review/workflow.yml
s
You can add the label "review-this" to the PR or add the openhands-agent as reviewer
c
Afaik there should be no need for the GitHub app for this, because it's supposed to work from the workflow. May I ask, did you do those steps at the start of the workflow?
f
yeah, I did the steps and can add the label and it works but it I just can't do
Requesting openhands-agent as a reviewer
s
Ah indeed. Since the github workflows rely on OH llm keys and not on user keys, they are not available to everyone. However, something that I find very useful for code reviews is triggering the agent skill
/codereview-roasted
. Check out the code here for example https://github.com/OpenHands/software-agent-sdk/pull/1241#issuecomment-3573042905 That will run with your own openhands llm key
f
hmm
c
ah interesting 🤔 i think you will need to have "openhands-agent" to be a maintainer of your codebase before you can request reviews from it lolsob
we are the special case, oh agent is actually in our org
is there anyway to write a github application so we can request reviews from it? 👀
c
the github workflows rely on OH llm keys and not on user keys,
Sorry, what do you mean here?
There is an LLM_API_KEY used in the workflow
From Simon's link:
@OpenHands /codereview-roasted read the diff and review the code. Find any possible simplification in the workflow code
That is calling the Cloud agent, not the SDK/workflow, though. From what I see, both the workflow and the script seem to use the user SDK installation, installed on the fly, and llm key from their repo. https://github.com/OpenHands/software-agent-sdk/blob/e3bb356eb9c7f3d8b73e1b32f56633496f251eb0/.github/workflows/pr-review-by-openhands.yml#L78 I think Xingyao is right... it's the requesting review action that might not work
s
Sorry, what do you mean here?
I was mistaken I thought @fresh-battery-50313 wanted to use
review-this
in the openhands repo. My bad!
👍 1
ah interesting 🤔 i think you will need to have "openhands-agent" to be a maintainer of your codebase before you can request reviews from it lolsob
Huh, maybe that feature should be removed if it's only usable easily in the OH organization
c
nod let's update the doc to remove that
s
@nutritious-balloon-65098 clone the docs and software-agent-sdk repositoryies Remove the feature that allows to assign a github review to "openhands-agent" by assigning openhands-agent as a reviewer: https://github.com/OpenHands/software-agent-sdk/blob/main/examples/03_github_workflows/02_pr_review/workflow.yml The only way of triggering an OpenHands PR review should be by adding the PR label 'review-this' Update the docs repo too to remove any mention of the deleted feature.
n
I'm on it! Simon Rosenberg can track my progress here.
✅ Task Completed Successfully I've successfully removed the openhands-agent reviewer trigger feature from both repositories. Here's what was done: Changes Made software-agent-sdk Repository 🔗 Branch pushed:
remove-reviewer-trigger-feature
Modified Files: 1.
examples/03_github_workflows/02_pr_review/workflow.yml
◦ Removed
review_requested
from event types (now only
labeled
) ◦ Simplified the
if
condition to only check for
review-this
label ◦ Updated comments to reflect label-only triggering 2.
examples/03_github_workflows/02_pr_review/README.md
◦ Removed all mentions of requesting openhands-agent as a reviewer ◦ Eliminated "Option 2: Requesting a Reviewer" section ◦ Simplified features and usage documentation docs Repository 🔗 Branch pushed:
remove-reviewer-trigger-feature
Modified Files: 1.
sdk/guides/github-workflows/pr-review.mdx
◦ Removed openhands-agent reviewer from introduction ◦ Deleted the note about openhands-agent access requirements ◦ Updated embedded workflow.yml code to match new implementation ◦ Simplified Quick Start and Security sections Result ✨ The PR review workflow now exclusively supports triggering via the
review-this
label
, making it universally accessible to all users without requiring special organization membership or collaborator access for the openhands-agent account. Next Steps You can now create pull requests from these branches: • software-agent-sdk: https://github.com/OpenHands/software-agent-sdk/pull/new/remove-reviewer-trigger-feature • docs: https://github.com/OpenHands/docs/pull/new/remove-reviewer-trigger-feature <sub>View full conversation</sub>
f
thanks all. I can use the label just fine