ComposioHQ/pr-review-ci-fix

Automated PR review and CI auto-fix for GitHub and GitLab using the Composio CLI. Pulls diffs, fetches failing job logs, posts review comments, and loops fix commits until checks go green.

Compatible con~Claude Code~Codex CLI~Cursor
npx add-skill https://github.com/ComposioHQ/awesome-codex-skills/tree/main/pr-review-ci-fix

name: pr-review-ci-fix description: Automated PR review and CI auto-fix for GitHub and GitLab using the Composio CLI. Pulls diffs, fetches failing job logs, posts review comments, and loops fix commits until checks go green. metadata: short-description: Automated PR review + CI auto-fix across GitHub/GitLab

PR Review + CI Auto-Fix

Drive GitHub/GitLab PR reviews and CI triage from the shell using the Composio CLI. No tab-switching between browser, terminal, and chat.

When to Use

  • A PR needs a structured review (correctness, style, risks) with inline comments.
  • CI is red and you want the agent to read the logs, patch the code, and recheck.
  • You want a single command that cycles: fetch diff → critique → fix → push → rerun.

Prereqs

curl -fsSL https://composio.dev/install | bash
composio login
composio link github        # or: composio link gitlab

Optional env for non-interactive runs: COMPOSIO_API_KEY.

Core Toolkits

Discover slugs with search, then pin them for reuse:

composio search "list pull request files" --toolkits github
composio search "download workflow logs" --toolkits github
composio search "create pr comment" --toolkits gitlab

Common slugs you'll reuse:

  • GITHUB_GET_A_PULL_REQUEST
  • GITHUB_LIST_PULL_REQUESTS_FILES
  • GITHUB_CREATE_A_REVIEW_FOR_A_PULL_REQUEST
  • GITHUB_LIST_WORKFLOW_RUNS_FOR_A_REPOSITORY
  • GITHUB_DOWNLOAD_WORKFLOW_RUN_LOGS
  • GITLAB_GET_SINGLE_MERGE_REQUEST
  • GITLAB_LIST_MERGE_REQUEST_DISCUSSIONS
  • GITLAB_CREATE_NEW_MERGE_REQUEST_NOTE

Always confirm via composio execute <SLUG> --get-schema before first use.

Review Workflow

  1. Pull the PR metadata + diff:
    composio execute GITHUB_GET_A_PULL_REQUEST \
      -d '{"owner":"acme","repo":"app","pull_number":482}'
    composio execute GITHUB_LIST_PULL_REQUESTS_FILES \
      -d '{"owner":"acme","repo":"app","pull_number":482}'
    
  2. Summarize risk areas (auth, migrations, public APIs, tests) into a review body.
  3. Post the review with inline comments:
    composio execute GITHUB_CREATE_A_REVIEW_FOR_A_PULL_REQUEST -d '{
      "owner":"acme","repo":"app","pull_number":482,
      "event":"COMMENT",
      "body":"Overall LGTM with 2 blocking notes.",
      "comments":[
        {"path":"src/auth.ts","line":42,"body":"Missing null check on session"},
        {"path":"src/auth.ts","line":88,"body":"Token TTL is hardcoded; move to config"}
      ]
    }'
    

CI Auto-Fix Loop

  1. Find the red run:
    composio execute GITHUB_LIST_WORKFLOW_RUNS_FOR_A_REPOSITORY \
      -d '{"owner":"acme","repo":"app","branch":"feat/billing","status":"failure"}'
    
  2. Pull logs:
    composio execute GITHUB_DOWNLOAD_WORKFLOW_RUN_LOGS \
      -d '{"owner":"acme","repo":"app","run_id":123456}'
    
  3. Parse failure → patch locally (the agent writes the fix into the working tree).
  4. Commit + push via local git, then re-poll step 1 until conclusion=success.
  5. Post a PR comment describing each fix commit so the human reviewer sees what changed.

One-Shot Workflow File

Save as scripts/review-and-fix.ts and run with composio run --file ./scripts/review-and-fix.ts -- --pr 482:

const pr = process.argv.includes("--pr")
  ? Number(process.argv[process.argv.indexOf("--pr") + 1])
  : null;

const meta = await execute("GITHUB_GET_A_PULL_REQUEST", {
  owner: "acme", repo: "app", pull_number: pr
});
const files = await execute("GITHUB_LIST_PULL_REQUESTS_FILES", {
  owner: "acme", repo: "app", pull_number: pr
});

console.log(JSON.stringify({ meta, files }, null, 2));

GitLab Variant

Swap slugs and param names:

composio execute GITLAB_GET_SINGLE_MERGE_REQUEST \
  -d '{"id":"acme/app","merge_request_iid":482}'
composio execute GITLAB_CREATE_NEW_MERGE_REQUEST_NOTE \
  -d '{"id":"acme/app","merge_request_iid":482,"body":"CI fix pushed as commit deadbeef"}'

Troubleshooting

  • Connection required for githubcomposio link github
  • Unknown input shapecomposio execute <SLUG> --get-schema
  • Log download huge → stream via composio proxy against the raw API and grep locally
  • Rate limits → serialize calls or lower poll frequency; avoid --parallel for the same repo

Full CLI reference: docs.composio.dev/docs/cli

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

Skills relacionados