Apigithub
List pull requests in a repository
Read operation: does not mutate upstream state.
curl -X GET "https://api.modernloop.dev/rest/v1/github/repos/string/string/pulls" \ -H "Authorization: Bearer $MLOOP_INTERNAL_MCP_API_KEY"{ "pullRequests": [ { "id": 0, "number": 0, "title": "string", "state": "string", "draft": true, "user": { "login": "string", "id": 0 }, "head": { "ref": "string", "sha": "string", "repo": "string" }, "base": { "ref": "string", "sha": "string" }, "html_url": "string", "created_at": "string", "updated_at": "string", "merged_at": "string", "closed_at": "string" } ], "totalCount": 0}{ "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
Query Parameters
page?integer
Page number (1-based)
Range
1 <= valueDefault
1perPage?integer
Results per page (max 100)
Range
1 <= value <= 100Default
30state?string
Filter by state
Default
"open"Value in
- "open"
- "closed"
- "all"
head?string
Filter by head, in the form user:ref-name
base?string
Filter by base branch name
sort?string
Sort by
Value in
- "created"
- "updated"
- "popularity"
- "long-running"
direction?string
Sort direction
Value in
- "asc"
- "desc"
Response Body
application/json
application/json
application/json
application/json
application/json