list_forge_pull_requests

List a repository's pull requests through the forge connection for its host, a page at a time: every one opened from a branch when one is named, whatever its state, or the open ones when none is.

Forgeread-onlyidempotentMCP tool

Give the repository as a git remote spells it, and pass the next_page_token back as pagination.cursor for the next page. A repository the connection's credential cannot see is answered as not found, which is also what a repository that does not exist answers. This asks the forge itself; list_pull_requests reads what komrad has stored.

Calling it#

curl -X POST http://127.0.0.1:8787/forge.v1.ForgeService/ListForgePullRequests \
  -H 'Content-Type: application/json' \
  -d '{
  "remoteUrl": "<remoteUrl>"
}'

Request#

ListForgePullRequestsRequest#

FieldTypeDescription
remoteUrlstring

The repository as a git remote spells it, such as git@github.com:owner/repo.git or https://github.com/owner/repo, whose host picks the forge connection.

required, at most 2048 characters

branchstring

The branch the pull requests were opened from, listed whatever their state; left empty, the repository's open pull requests are listed instead.

at most 512 characters

paginationPagination

Which page to read and how many to a page, twenty when unset and at most a hundred, which is what the forge will hand over in one call.

Response#

ListForgePullRequestsResponse#

FieldTypeDescription
pullRequestslist of ForgePullRequest

One page of pull requests, as the forge orders them.

nextPageTokenstring

The token for the page after this one, unset on the last.

Types#

Pagination#

FieldTypeDescription
limitint32

How many rows to return, capped by the server, and left to the server entirely when unset.

cursorstring

The next_page_token a previous reply carried, or unset to start from the beginning.

at most 2048 characters

ForgePullRequest#

ForgePullRequest is a pull request as the forge describes it, read live and stored nowhere.

FieldTypeDescription
forgestring

Which forge it lives on, such as github.

providerIdstring

The forge's own stable identifier, such as GitHub's node_id.

urlstring

The web address a person opens.

repositoryUrlstring

The canonical address of the repository it targets.

headRepositoryUrlstring

The canonical address of the repository its branch lives in, empty when the forge no longer has it.

numberint32

The number the forge shows a person, which is per repository.

titlestring

The title as the forge has it.

headBranchstring

The branch the pull request was opened from.

headShastring

The commit at the tip of that branch when last read.

baseBranchstring

The branch it targets.

baseShastring

The commit the target branch was at when last read.

draftbool

Whether the forge marks it a draft.

statestring

Where the forge says it stands, as OPEN, CLOSED or MERGED; read merged_at and closed_at for whether it is finished.

createdAtstring

When it was opened on the forge, in RFC 3339.

updatedAtstring

When the forge last saw it change, in RFC 3339.

mergedAtstring

When it merged, in RFC 3339, unset while it has not.

closedAtstring

When it closed, in RFC 3339, unset while it is open; a merged one carries this too.