Skip to content

patch repo#2084

Closed
enyst wants to merge 2 commits intoOpenHands:mainfrom
enyst:enyst-patch-1
Closed

patch repo#2084
enyst wants to merge 2 commits intoOpenHands:mainfrom
enyst:enyst-patch-1

Conversation

@enyst
Copy link
Collaborator

@enyst enyst commented Feb 15, 2026

Summary

[fill in a summary of this PR]

Checklist

  • If the PR is changing/adding functionality, are there tests to reflect this?
  • If there is an example, have you run the example to make sure that it works?
  • If there are instructions on how to run the code, have you followed the instructions and made sure that it works?
  • If the feature is significant enough to require documentation, is there a PR open on the OpenHands/docs repository with the same branch name?
  • Is the github CI passing?

enyst and others added 2 commits February 15, 2026 13:06
* Add GitHub App auth option for PR review bot
 * docs: mention required GitHub permissions for auth

---------

Co-authored-by: openhands <openhands@all-hands.dev>
@enyst enyst closed this Feb 15, 2026
@enyst enyst deleted the enyst-patch-1 branch February 15, 2026 12:44
Copy link
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Needs rework - Critical issue found: production workflow references personal fork instead of official repo. Authentication logic looks solid but lacks error handling and tests.

steps:
- name: Run PR Review
uses: OpenHands/software-agent-sdk/.github/actions/pr-review@main
uses: enyst/agent-sdk/.github/actions/pr-review@main
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Critical: Production workflow is pointing to a personal fork (enyst/agent-sdk) instead of the official repo. This needs to reference OpenHands/software-agent-sdk/.github/actions/pr-review@main or this is a major security/reliability issue.

Suggested change
uses: enyst/agent-sdk/.github/actions/pr-review@main
uses: OpenHands/software-agent-sdk/.github/actions/pr-review@main

LLM_API_KEY: ${{ inputs.llm-api-key }}
GITHUB_TOKEN: ${{ inputs.github-token }}
GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token || inputs.github-token }}
run: |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Important: Silent fallback could hide configuration errors. If someone provides GitHub App credentials but token generation fails, they won't know. Consider adding explicit validation:

if [ -n "${{ inputs.github-app-id }}" ] && [ -z "$GITHUB_TOKEN" ]; then
  echo "Error: GitHub App credentials provided but token generation failed."
  exit 1
fi

github.event.label.name == 'review-this' ||
github.event.requested_reviewer.login == 'openhands-agent' ||
github.event.requested_reviewer.login == 'openhands-reviewer' ||
github.event.requested_reviewer.login == 'openhands-reviewer[bot]' ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Suggestion: Adding multiple reviewer triggers is good, but this conditional is getting complex. Consider documenting why both openhands-reviewer and openhands-reviewer[bot] are needed (presumably one for manual requests, one for automatic assignments?).

llm-api-key: ${{ secrets.LLM_API_KEY }}
# Authentication options:
# - Preferred: GitHub App installation token (created inside the composite action)
# - Fallback: all-hands-bot PAT (existing behavior)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Suggestion: The comment says "Preferred: GitHub App" but you still provide both. If App auth is truly preferred and available, you could make the PAT conditional. As-is, you're always passing both and relying on the action's internal fallback logic. This works but might not be what you intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants