Apigithub
Create a pull request
Write operation: mutates state in the upstream service.
curl -X POST "https://api.modernloop.dev/rest/v1/github/repos/string/string/pulls" \ -H "Authorization: Bearer $MLOOP_INTERNAL_MCP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "string", "head": "string", "base": "string" }'{ "id": 0, "number": 0, "title": "string", "body": "string", "state": "string", "draft": true, "merged": true, "mergeable": true, "mergeable_state": "string", "user": { "login": "string", "id": 0 }, "head": { "ref": "string", "sha": "string", "repo": "string" }, "base": { "ref": "string", "sha": "string" }, "html_url": "string", "diff_url": "string", "commits": 0, "additions": 0, "deletions": 0, "changed_files": 0, "labels": [ { "name": "string", "color": "string" } ], "milestone": { "title": "string", "number": 0 }, "assignees": [ { "login": "string", "id": 0 } ], "requested_reviewers": [ { "login": "string", "id": 0 } ], "created_at": "string", "updated_at": "string", "merged_at": "string", "closed_at": "string"}{ "error": { "code": "string", "message": "string", "upstreamStatus": 0 }}{ "error": { "code": "string", "message": "string", "upstreamStatus": 0 }}{ "error": { "code": "string", "message": "string", "upstreamStatus": 0 }}{ "error": { "code": "string", "message": "string", "upstreamStatus": 0 }}Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
owner*string
Repository owner (user or organization)
repo*string
Repository name
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
title*string
Length
1 <= lengthhead*string
Branch containing the changes
Length
1 <= lengthbase*string
Branch to merge into
Length
1 <= lengthbody?string
PR description (Markdown)
draft?boolean
Create as draft PR
maintainerCanModify?boolean
Allow maintainer edits
Response Body
application/json
application/json
application/json
application/json
application/json