{
  "id": "github-pr-reviewer",
  "version": "1.0.0",
  "name": "GitHub Code Review Agent",
  "category": "Code review",
  "description": "Watch for a configurable label on GitHub pull requests, inspect full PR and repository context, and post an AI review comment once per label event.",
  "requires": {
    "integrations": {
      "github": {
        "message": "Used to read pull requests and post review comments."
      }
    },
    "features": [
      "customTarball"
    ]
  },
  "popularityRank": 100,
  "estimatedSetupMinutes": 4,
  "exampleImplementation": "Trigger: cron polling for open GitHub PRs with a configured label such as openhands-review\nRequired secret: GITHUB_PERSONAL_ACCESS_TOKEN, with permission to write pull request reviews\n\n1. Read the repositories, trigger label, review tone, and polling schedule from setup.\n2. Poll each repository independently, with its own state, so PR numbers never collide.\n3. List open PRs and find the latest matching GitHub labeled issue event for each labeled PR.\n4. Deduplicate on the label event ID so every label application queues exactly one review.\n5. Extract the PR head commit into a directory of its own and start an OpenHands conversation with that directory as its workspace, so the agent reviews the exact commit without cloning anything.\n6. Post an acknowledgement with the conversation link, then confirm on GitHub that the review was published for that head SHA, falling back to posting the agent's text as a comment.\n7. Remove the checkout once the conversation has stopped, so nothing accumulates between runs.",
  "setup": {
    "version": "1.0",
    "mode": "direct",
    "form": {
      "triggers": {
        "cron": {
          "schedule": {
            "type": "cron",
            "label": "Check frequency",
            "help": "How often to look for newly labelled pull requests.",
            "default": "*/15 * * * *",
            "required": true
          },
          "timezone": {
            "type": "timezone",
            "label": "Timezone",
            "help": "Timezone the schedule is interpreted in.",
            "default": "UTC",
            "required": true
          }
        }
      },
      "args": {
        "repositories": {
          "type": "repo-picker",
          "label": "Repositories",
          "help": "The repositories whose pull requests will be reviewed. Each is polled independently and keeps its own state, so pull request numbers never collide between them.",
          "provider": "github",
          "multiple": true,
          "required": true
        },
        "triggerLabel": {
          "type": "text",
          "label": "Trigger label",
          "help": "Only pull requests carrying this label are reviewed.",
          "default": "openhands-review",
          "required": true,
          "constraints": {
            "minLength": 1,
            "maxLength": 50
          }
        },
        "reviewTone": {
          "type": "select",
          "label": "Review tone",
          "help": "How detailed the review comments should be.",
          "default": "concise",
          "required": true,
          "options": [
            {
              "value": "concise",
              "label": "Concise"
            },
            {
              "value": "thorough",
              "label": "Thorough"
            },
            {
              "value": "friendly",
              "label": "Friendly"
            }
          ]
        }
      }
    },
    "bundle": {
      "version": "1.0.0",
      "entrypoint": "python3 main.py",
      "timeout": 600,
      "files": {
        "main.py": "skills/github-pr-reviewer/scripts/main.py"
      },
      "config": {
        "repos": "{{form.repositories}}",
        "trigger_label": "{{form.triggerLabel}}",
        "review_tone": "{{form.reviewTone}}"
      }
    },
    "message": "This deployment cannot run the scheduled review automation directly. Set it up in this conversation instead: confirm the repository to review, the trigger label, the review tone, and the polling schedule, then create the automation."
  }
}
