Skip to content

Migrate PR review plugin to extensions repository#2324

Open
juanmichelini wants to merge 15 commits intomainfrom
migrate-pr-review-to-extensions
Open

Migrate PR review plugin to extensions repository#2324
juanmichelini wants to merge 15 commits intomainfrom
migrate-pr-review-to-extensions

Conversation

@juanmichelini
Copy link
Collaborator

@juanmichelini juanmichelini commented Mar 5, 2026

This PR migrates the PR review plugin scripts from the SDK repository to the extensions repository, addressing issue #2282.

Changes

Deleted Files

  • examples/03_github_workflows/02_pr_review/agent_script.py - Now lives in extensions repo
  • examples/03_github_workflows/02_pr_review/prompt.py - Now lives in extensions repo
  • examples/03_github_workflows/02_pr_review/evaluate_review.py - Now lives in extensions repo
  • .github/actions/pr-review/action.yml - Now lives in extensions repo
  • examples/03_github_workflows/02_pr_review/action.yml - Removed symlink

Updated Files

  • .github/workflows/pr-review-by-openhands.yml: Updated to use the OpenHands/extensions/plugins/pr-review composite action, aligning with the OpenHands/benchmarks repository structure.
  • .github/workflows/pr-review-evaluation.yml: Updated to use the evaluation script from the extensions repository, aligning with the OpenHands/benchmarks repository structure.
  • examples/03_github_workflows/02_pr_review/workflow.yml: Updated to use the composite action, simplifying usage for users.
  • examples/03_github_workflows/02_pr_review/README.md:
    • Updated documentation to reflect usage of the composite action.
    • Replaced environment variable configuration with action inputs configuration.

Benefits

✅ Eliminates duplicate maintenance of PR review scripts across two repositories
✅ Simplifies workflow configuration by using a shared composite action
✅ Aligns workflow structure with OpenHands/benchmarks best practices
✅ Cleaner separation of concerns - SDK for framework, extensions for plugins

Related Issues

Closes #2282

Testing

The updated workflows now:

  1. Use OpenHands/extensions/plugins/pr-review@main to perform reviews
  2. Use extensions/plugins/pr-review/scripts/evaluate_review.py for evaluation

Users can continue using the workflow by referencing the composite action as shown in the updated example.


Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.13-nodejs22 Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:abfc43f-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-abfc43f-python \
  ghcr.io/openhands/agent-server:abfc43f-python

All tags pushed for this build

ghcr.io/openhands/agent-server:abfc43f-golang-amd64
ghcr.io/openhands/agent-server:abfc43f-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:abfc43f-golang-arm64
ghcr.io/openhands/agent-server:abfc43f-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:abfc43f-java-amd64
ghcr.io/openhands/agent-server:abfc43f-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:abfc43f-java-arm64
ghcr.io/openhands/agent-server:abfc43f-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:abfc43f-python-amd64
ghcr.io/openhands/agent-server:abfc43f-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-amd64
ghcr.io/openhands/agent-server:abfc43f-python-arm64
ghcr.io/openhands/agent-server:abfc43f-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-arm64
ghcr.io/openhands/agent-server:abfc43f-golang
ghcr.io/openhands/agent-server:abfc43f-java
ghcr.io/openhands/agent-server:abfc43f-python

About Multi-Architecture Support

  • Each variant tag (e.g., abfc43f-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., abfc43f-python-amd64) are also available if needed

- Delete agent_script.py and prompt.py (now in extensions repo)
- Update action.yml to load scripts from OpenHands/extensions
- Change sdk-repo/sdk-version inputs to extensions-repo/extensions-version
- Update README and workflow.yml to reflect new structure
- Install openhands-sdk and openhands-tools from PyPI

Related to #2282

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Python API breakage checks — ✅ PASSED

Result:PASSED

Action log

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

REST API breakage checks (OpenAPI) — ❌ FAILED

Result:FAILED

⚠️ Breaking REST API changes or policy violations detected.

Log excerpt (first 1000 characters)
::error title=openhands-agent-server REST API::Breaking REST API change detected without MINOR version bump (1.14.0 -> 1.14.0).

Breaking REST API changes detected compared to baseline release:
- added '#/components/schemas/ACPAgent-Output, #/components/schemas/Agent-Output' to the '/items/anyOf[subschema #1: ConversationInfo]/agent' response property 'oneOf' list for the response status '200'
- the '/items/anyOf[subschema #1: ConversationInfo]/agent' response's property type/format changed from 'object'/'' to ''/'' for status '200'
- removed the required property '/items/anyOf[subschema #1: ConversationInfo]/agent/kind' from the response with the '200' status
- removed the required property '/items/anyOf[subschema #1: ConversationInfo]/agent/llm' from the response with the '200' status
- the 'agent' request property type/format changed from 'object'/'' to ''/''
- added '#/components/schemas/ACPAgent-Output, #/components/schemas/Agent-Output' to the 'agent' response property 'oneOf' li

Action log

@juanmichelini
Copy link
Collaborator Author

@OpenHands actually we already have https://github.com/OpenHands/software-agent-sdk/blob/main/.github/workflows/pr-review-by-openhands.yml so let's remove ‎.github/actions/pr-review/action.yml and instead make the example refer to .github/workflows/pr-review-by-openhands.yml

@openhands-ai
Copy link

openhands-ai bot commented Mar 9, 2026

I'm on it! juanmichelini can track my progress at all-hands.dev

@openhands-ai
Copy link

openhands-ai bot commented Mar 9, 2026

I have completed the migration of the PR review logic from a composite action to direct workflow steps, as requested.

Summary of Changes:

  1. Removed Composite Action:

    • Deleted .github/actions/pr-review/action.yml.
    • Deleted the symlink at examples/03_github_workflows/02_pr_review/action.yml.
  2. Updated Workflows:

    • Modified .github/workflows/pr-review-by-openhands.yml to inline the necessary steps: checking out the extensions repository, installing dependencies (uv, gh, openhands-sdk), and running the agent_script.py directly.
    • Updated examples/03_github_workflows/02_pr_review/workflow.yml to serve as a standalone example that users can copy, replacing the previous action usage with the inlined steps.
  3. Updated Documentation:

    • Updated examples/03_github_workflows/02_pr_review/README.md to reflect the new configuration method (environment variables instead of action inputs) and removed references to the composite action.

The changes have been pushed to the migrate-pr-review-to-extensions branch.

@juanmichelini
Copy link
Collaborator Author

@OpenHands that's better, but notice that ./03_github_workflows/02_pr_review/evaluate_review.py also lives in the extension repo now see https://github.com/OpenHands/extensions/tree/main/plugins/pr-review/workflows
also action.yml also lives there.
So we should reflect that in this change. Update the files in this PR, also update the description

@openhands-ai
Copy link

openhands-ai bot commented Mar 9, 2026

I'm on it! juanmichelini can track my progress at all-hands.dev

@openhands-ai
Copy link

openhands-ai bot commented Mar 9, 2026

I have completed the requested changes to migrate evaluate_review.py to the extensions repository and updated the PR description.

Changes Implemented:

  1. Deleted File: Removed examples/03_github_workflows/02_pr_review/evaluate_review.py from the SDK repository as it now resides in the extensions repository.
  2. Updated Workflow: Modified .github/workflows/pr-review-evaluation.yml to:
    • Checkout the OpenHands/extensions repository.
    • Execute the evaluation script from extensions/plugins/pr-review/workflows/evaluate_review.py.
  3. Updated Documentation: Edited examples/03_github_workflows/02_pr_review/README.md to remove the reference to the local evaluate_review.py file.
  4. Updated PR Description: Revised the PR description (body) to explicitly list evaluate_review.py and action.yml under "Deleted Files" and updated the "Updated Files" section to reflect the workflow changes.

The changes have been pushed to the migrate-pr-review-to-extensions branch.

Copy link
Collaborator Author

I have aligned the workflows with the repository structure as requested.

Updates:

  1. .github/workflows/pr-review-by-openhands.yml: Now uses the composite action.
  2. .github/workflows/pr-review-evaluation.yml: Now uses the evaluation script from the extensions repository.
  3. examples/03_github_workflows/02_pr_review/workflow.yml: Updated to use the composite action for simplicity.
  4. examples/03_github_workflows/02_pr_review/README.md: Updated documentation to reflect the new action inputs.

@juanmichelini juanmichelini requested a review from xingyaoww March 11, 2026 15:15
@juanmichelini juanmichelini marked this pull request as ready for review March 11, 2026 15:15
@juanmichelini juanmichelini removed the request for review from xingyaoww March 11, 2026 15:15
@juanmichelini juanmichelini enabled auto-merge (squash) March 12, 2026 21:49
@juanmichelini juanmichelini requested a review from enyst March 12, 2026 21:49
@xingyaoww xingyaoww requested a review from all-hands-bot March 13, 2026 11:26
enyst and others added 2 commits March 13, 2026 17:13
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
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.

PR reviewer plugin should live in the extensions repo

4 participants