Loading...
Loading...
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.
npx skill4agent add composiohq/awesome-codex-skills pr-review-ci-fixcurl -fsSL https://composio.dev/install | bash
composio login
composio link github # or: composio link gitlabCOMPOSIO_API_KEYcomposio search "list pull request files" --toolkits github
composio search "download workflow logs" --toolkits github
composio search "create pr comment" --toolkits gitlabGITHUB_GET_A_PULL_REQUESTGITHUB_LIST_PULL_REQUESTS_FILESGITHUB_CREATE_A_REVIEW_FOR_A_PULL_REQUESTGITHUB_LIST_WORKFLOW_RUNS_FOR_A_REPOSITORYGITHUB_DOWNLOAD_WORKFLOW_RUN_LOGSGITLAB_GET_SINGLE_MERGE_REQUESTGITLAB_LIST_MERGE_REQUEST_DISCUSSIONSGITLAB_CREATE_NEW_MERGE_REQUEST_NOTEcomposio execute <SLUG> --get-schemacomposio 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}'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"}
]
}'composio execute GITHUB_LIST_WORKFLOW_RUNS_FOR_A_REPOSITORY \
-d '{"owner":"acme","repo":"app","branch":"feat/billing","status":"failure"}'composio execute GITHUB_DOWNLOAD_WORKFLOW_RUN_LOGS \
-d '{"owner":"acme","repo":"app","run_id":123456}'gitconclusion=successscripts/review-and-fix.tscomposio run --file ./scripts/review-and-fix.ts -- --pr 482const 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));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"}'Connection required for githubcomposio link githubcomposio execute <SLUG> --get-schemacomposio proxygrep--parallel