Skip to content

Comments

docs: Update code review documentation with PR review workflow#302

Merged
xingyaoww merged 27 commits intomainfrom
openhands/update-code-review-docs
Feb 8, 2026
Merged

docs: Update code review documentation with PR review workflow#302
xingyaoww merged 27 commits intomainfrom
openhands/update-code-review-docs

Conversation

@xingyaoww
Copy link
Contributor

  • I have read and reviewed the documentation changes to the best of my ability.
  • If the change is significant, I have run the documentation site locally and confirmed it renders as expected.

Summary of changes

This PR completely rewrites the code review documentation page (openhands/usage/use-cases/code-review.mdx) to document the automated PR review workflow powered by the OpenHands Software Agent SDK.

Changes

High-Level Overview

  • Explains how the PR review workflow works using the Software Agent SDK
  • Documents the two skills used: /codereview (or /codereview-roasted) for code analysis and /github-pr-review for posting inline comments

How to Use

  • Added a comprehensive Quick Start guide with step-by-step setup instructions
  • Explains the two trigger methods: review-this label and requesting openhands-agent as reviewer

Customization

  • Documents how to create repo-specific review guidelines via .openhands/skills/code-review.md with /codereview trigger
  • Shows how to modify the workflow for different triggers, review styles, and LLM configurations

Additional Sections

  • Security considerations for handling fork PRs
  • What gets reviewed (code quality, security, best practices)
  • Example review output showing priority labels and suggestion syntax
  • Troubleshooting guide

Closes #297

@xingyaoww can click here to continue refining the PR

jpelletier1 and others added 6 commits January 29, 2026 20:19
This is an initial layout that roughly mimics Devin docs. It attempts to separate Documentation and Use Cases.
- incident-triage.mdx: Add content based on Datadog debugging blog post
  - Features automated error analysis with OpenHands SDK
  - Includes GitHub Actions workflow for Datadog integration
  - Links to blog: https://openhands.dev/blog/debugging-production-issues-with-ai-agents-automating-datadog-error-analysis

- cobol-modernization.mdx: Add content based on COBOL-to-Java refactoring blog post
  - Features iterative refinement approach with multiple agents
  - Includes code transformation examples (COBOL to Java)
  - Links to blog: https://openhands.dev/blog/20251218-cobol-to-java-refactoring

- vulnerability-remediation.mdx: Add content based on vulnerability fixer documentation
  - Explains automated vulnerability remediation with AI agents
  - Links to example implementation at github.com/OpenHands/vulnerability-fixer
  - Covers integration with security scanners (Snyk, Dependabot, CodeQL)

- dependency-upgrades.mdx: Remove redundant security scanning section
  - Links to Vulnerability Remediation page for security-related upgrades
  - Focuses on general dependency upgrade workflows

Co-authored-by: openhands <openhands@all-hands.dev>
- Rename from 'TODO-Tutorial Library' to 'Tutorial Library'
- Remove 'Getting Started with Tutorials' section
- Add Note linking to Use Cases section for in-depth guidance
- Add Code Review cross-references:
  - Link to Code Review Use Case page
  - Link to PR Review SDK Guide (sdk/guides/github-workflows/pr-review)
- Add Bug Fixing cross-reference to Incident Triage Use Case

Co-authored-by: openhands <openhands@all-hands.dev>
Replace tabs-based layout with a card-based design:
- OpenHands Cloud (recommended) - links to https://app.all-hands.dev
- Local GUI - links to /openhands/usage/run-openhands/local-setup
- Terminal / CLI - links to /openhands/usage/cli/installation

Each card includes relevant icons and bullet points highlighting key features.

Co-authored-by: openhands <openhands@all-hands.dev>
- Rewrite code-review.mdx to document the automated PR review workflow
- Explain how the workflow uses the Software Agent SDK with /codereview and /github-pr-review skills
- Add Quick Start guide with step-by-step setup instructions
- Document customization options including repo-specific review guidelines
- Add security considerations and troubleshooting sections
- Remove TODO- prefix from title

Closes #297
@openhands-ai openhands-ai bot mentioned this pull request Feb 5, 2026
5 tasks
@xingyaoww
Copy link
Contributor Author

@OpenHands please review the diff of this PR, and this PR: OpenHands/software-agent-sdk#1927

Now the SDK supports the new composed github action, can you update the documentation we add in this PR accordingly?

@openhands-ai
Copy link

openhands-ai bot commented Feb 8, 2026

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

Update the code review documentation to reflect the new composite GitHub
Action from software-agent-sdk PR #1927. The changes include:

- Simplified Quick Start workflow using the composite action
- Added new 'Composite Action' section with action inputs table
- Updated Customization section to show input-based configuration
- Removed manual setup steps (Python, uv, dependencies) that are now
  handled by the composite action

Co-authored-by: openhands <openhands@all-hands.dev>
@openhands-ai
Copy link

openhands-ai bot commented Feb 8, 2026

I've updated the code review documentation to reflect the new composite GitHub Action from software-agent-sdk PR #1927. The changes have been pushed to the openhands/update-code-review-docs branch.

Summary of Changes

File modified: openhands/usage/use-cases/code-review.mdx

Key Updates:

  1. Simplified Quick Start workflow - Replaced the verbose 50+ line workflow with a simple 8-line configuration using the new composite action:

    - name: Run PR Review
      uses: OpenHands/software-agent-sdk/.github/actions/pr-review@main
      with:
        llm-model: anthropic/claude-sonnet-4-5-20250929
        review-style: standard
        llm-api-key: ${{ secrets.LLM_API_KEY }}
        github-token: ${{ secrets.GITHUB_TOKEN }}
  2. Added new "Composite Action" section - Documents what the composite action handles automatically and includes a complete action inputs table with all 7 inputs (llm-model, llm-base-url, review-style, sdk-version, sdk-repo, llm-api-key, github-token)

  3. Updated Customization section - Changed from env variable configuration to the new input-based configuration style

  4. Removed manual setup steps - The composite action now handles Python setup, uv installation, dependency installation, and log artifact uploads automatically

The documentation is now much simpler for users to follow while still providing all the customization options through the action inputs.

View full conversation

@xingyaoww
Copy link
Contributor Author

@OpenHands please fix the failing actions on PR #302 at branch openhands/update-code-review-docs

@openhands-ai
Copy link

openhands-ai bot commented Feb 8, 2026

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

Co-authored-by: openhands <openhands@all-hands.dev>
@openhands-ai
Copy link

openhands-ai bot commented Feb 8, 2026

I've fixed the failing GitHub Actions on PR #302 by removing a broken link.

Summary of Changes

File modified: openhands/usage/use-cases/dependency-upgrades.mdx

Issue: The "Check Broken Links" GitHub Action was failing because the file contained a link to /openhands/usage/admin/security, which is a non-existent page.

Fix: Removed the broken link from the "Related Resources" section. The link was:

- [Security](/openhands/usage/admin/security) - Security best practices

The remaining related resources (Vulnerability Remediation and Prompting Best Practices) are still present and link to valid pages.

Verification: Ran mint broken-links locally and confirmed no broken links remain.

Commit: b76480e - "fix: Remove broken link to non-existent security page"

The changes have been pushed to the openhands/update-code-review-docs branch and the GitHub Actions should now pass.

View full conversation

@xingyaoww xingyaoww marked this pull request as ready for review February 8, 2026 17:00
@xingyaoww xingyaoww requested a review from mamoodi as a code owner February 8, 2026 17:00
@xingyaoww
Copy link
Contributor Author

@OpenHands pls bring changes introduced in #306 to this PR

@openhands-ai
Copy link

openhands-ai bot commented Feb 8, 2026

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

@xingyaoww xingyaoww requested a review from enyst as a code owner February 8, 2026 17:10
@openhands-ai
Copy link

openhands-ai bot commented Feb 8, 2026

I've successfully brought the changes from PR #306 to this PR. The changes have been pushed to the openhands/update-code-review-docs branch.

Summary of Changes

File modified: sdk/guides/github-workflows/pr-review.mdx

Key Updates from PR #306:

  1. Added "Customizable" feature - New bullet point in Features section highlighting the ability to add custom code review guidelines without forking

  2. New "Customizing the Code Review" section including:

    • How custom skills work (overriding default skills from OpenHands/skills)
    • Example custom code review skill with complete markdown template
    • Benefits of custom skills (no forking, version controlled, easy updates, team alignment)
    • Link to software-agent-sdk's own code-review skill as reference
  3. Updated Reference Workflow - Simplified from ~50 lines to ~20 lines using the new composite action:

    • Uses OpenHands/software-agent-sdk/.github/actions/pr-review composite action
    • Cleaner configuration with named inputs
    • Updated comments with more information
  4. Added Action Inputs table - Documents all available inputs for the composite action (llm-model, llm-base-url, review-style, sdk-version, sdk-repo, llm-api-key, github-token)

  5. Added Composite Action link - New entry in Related Files section pointing to the composite action

The changes are now live on PR #302.

View full conversation

@xingyaoww xingyaoww force-pushed the openhands/update-code-review-docs branch from 224c15a to 0717119 Compare February 8, 2026 17:11
@xingyaoww xingyaoww force-pushed the openhands/update-code-review-docs branch 2 times, most recently from 0717119 to b76480e Compare February 8, 2026 17:26
…site action

- Add 'Customizable' feature to Features section
- Add new 'Customizing the Code Review' section with:
  - How custom skills work
  - Example custom code review skill
  - Benefits of custom skills
- Update Reference Workflow to use simplified composite action
- Add Action Inputs table documenting all available inputs
- Add link to Composite Action in Related Files

Co-authored-by: openhands <openhands@all-hands.dev>
…de-review.mdx

- Add link to Composite Action in Related Resources section
- Add reference to software-agent-sdk's code-review skill as example

Co-authored-by: openhands <openhands@all-hands.dev>
- Add links to /codereview skill in OpenHands/skills repo
- Add links to /codereview-roasted skill in OpenHands/skills repo
- Add links to /github-pr-review skill in OpenHands/skills repo

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
- Remove generic 'What Gets Reviewed' section with tabs
- Replace 'Example Review Output' with table of real PR examples from software-agent-sdk
- Link to PRs #1927, #1916, #1904, #1889 showing different review styles

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
- Add 'API Key Protection' subsection explaining the potential risk
- Document how SDK secrets mitigate the risk
- Add best practices: review PRs first, use separate API keys, monitor usage
- Link to SDK secrets documentation

Co-authored-by: openhands <openhands@all-hands.dev>
openhands-agent and others added 4 commits February 8, 2026 17:51
- Summarize pull_request_target usage in one sentence
- Keep warning about API key exfiltration risk concise
- Remove prescriptive best practices list

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
@openhands-ai
Copy link

openhands-ai bot commented Feb 8, 2026

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • .github/workflows/sync-docs-code-blocks.yml
    • .github/workflows/sync-agent-sdk-openapi.yml

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #302 at branch `openhands/update-code-review-docs`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

Copy link
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

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

Was this intended, to be only on Joe's branch?

Of course we can move forward anyway, just wondering since this is probably compatible with main as far as I can tell

@xingyaoww xingyaoww changed the base branch from jp/docs-restructure-0129 to main February 8, 2026 18:38
@xingyaoww
Copy link
Contributor Author

@enyst yep! looks like we can merge to main

@xingyaoww xingyaoww merged commit e557ece into main Feb 8, 2026
4 checks passed
@xingyaoww xingyaoww deleted the openhands/update-code-review-docs branch February 8, 2026 18:39
xingyaoww added a commit that referenced this pull request Feb 8, 2026
@xingyaoww
Copy link
Contributor Author

xingyaoww commented Feb 8, 2026

My bad :(

Looks like this PR also included a bunch of changes from Joe's PR that's probably not yet ready -- trying to revert unnecessary ones in #311

xingyaoww pushed a commit that referenced this pull request Feb 8, 2026
Co-authored-by: openhands <openhands@all-hands.dev>
xingyaoww pushed a commit that referenced this pull request Feb 8, 2026
Co-authored-by: openhands <openhands@all-hands.dev>
xingyaoww added a commit that referenced this pull request Feb 8, 2026
… workflow" (#311)

* Revert "docs: Update code review documentation with PR review workflow (#302)"

This reverts commit e557ece.

* Keep pr-review.mdx changes from PR #302

Co-authored-by: openhands <openhands@all-hands.dev>

* Keep code-review.mdx changes from PR #302

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.

Review Use Case: Code Review

4 participants