list_pull_requests
List the pull requests komrad has stored for a repository, a page at a time: every one opened from a branch when one is named, whatever its state, or every one stored for the repository when none is.
Pull Requestread-onlyidempotentMCP tool
The unfinished ones come first and each group is newest opened first, so the first answered for a branch is the one an agent's row on that branch stands for. Give the repository as a git remote spells it or as its canonical address, and pass the next_page_token back as pagination.cursor for the next page. This reads what the pull request sync has stored rather than asking the forge, so a repository no live agent sits on may be behind or empty; list_forge_pull_requests asks the forge itself.
Calling it#
curl -X POST http://127.0.0.1:8787/pullrequest.v1.PullRequestService/ListPullRequests \
-H 'Content-Type: application/json' \
-d '{
"repositoryUrl": "<repositoryUrl>"
}'komrad rpc list-pull-requests \
--repository-url <string>{
"name": "list_pull_requests",
"arguments": {
"repositoryUrl": "<repositoryUrl>"
}
}Offered by the komrad MCP server to implementer, orchestrator agents.
Request#
ListPullRequestsRequest#
| Field | Type | Description |
|---|---|---|
repositoryUrl | string | The repository the pull requests target, as a git remote spells it or as the canonical address komrad stores. required, at most 2048 characters |
headBranch | string | The branch the pull requests were opened from; left empty, every pull request stored for the repository is listed. at most 512 characters |
pagination | Pagination | Which page to read and how many to a page, twenty when unset and at most a hundred. |
Response#
ListPullRequestsResponse#
| Field | Type | Description |
|---|---|---|
pullRequests | list of PullRequest | One page of pull requests, the unfinished ones first and each group newest opened first, so the first is the one an agent's row on the branch stands for. |
nextPageToken | string | The token for the page after this one, unset on the last. |
Types#
Pagination#
PullRequest#
| Field | Type | Description |
|---|---|---|
id | string | The handle komrad keys the row by. |
forge | string | Which forge it lives on, such as github. |
providerId | string | The forge's own stable identifier, such as GitHub's node_id. |
url | string | The web address a person opens. |
repositoryUrl | string | The canonical address of the repository it targets. |
headRepositoryUrl | string | The canonical address of the repository its branch lives in, empty when the forge no longer has it. |
number | int32 | The number the forge shows a person, which is per repository. |
title | string | The title as the forge has it. |
headBranch | string | The branch the pull request was opened from. |
headSha | string | The commit at the tip of that branch when last read. |
baseBranch | string | The branch it targets. |
baseSha | string | The commit the target branch was at when last read. |
draft | bool | Whether the forge marks it a draft. |
state | PullRequestState | Where it stands, decided from the stored row. |
openedAt | string | When it was opened on the forge, in RFC 3339. |
changedAt | string | When the forge last saw it change, in RFC 3339. |
mergedAt | string | When it merged, in RFC 3339, unset while it has not. |
closedAt | string | When it closed, in RFC 3339, unset while it is open; a merged one carries this too. |
reviewDecision | ReviewDecision | Where the forge says the reviews stand. |
checks | Checks | Where the checks on its head stand. |
mergeability | Mergeability | Where the forge says it stands against its base and rules. |
PullRequestState#
PullRequestState is where a stored pull request stands, decided on the server from its stamps, its draft flag, the checks on its head, its mergeability and the forge's review decision, finished first.
| Value | Description |
|---|---|
PULL_REQUEST_STATE_UNREAD | The repository's first sweep has not completed, so nothing is known. |
PULL_REQUEST_STATE_NONE | The repository has been swept and nothing was opened from the branch. |
PULL_REQUEST_STATE_OPEN | Open with no review decision that settles it. |
PULL_REQUEST_STATE_APPROVED | Open and the forge would merge it now: its rules on reviews and checks are met and the branch is level with its base. |
PULL_REQUEST_STATE_CHANGES_REQUESTED | Open with a reviewer asking for changes. |
PULL_REQUEST_STATE_DRAFT | Still a draft, whatever its reviews say. |
PULL_REQUEST_STATE_MERGED | Merged. |
PULL_REQUEST_STATE_CLOSED | Closed without merging. |
PULL_REQUEST_STATE_FAILING | Open with a failing check on its head, whatever its reviews say. |
PULL_REQUEST_STATE_APPROVED_WAITING | Approved on the forge but not yet mergeable: its checks are still running, its branch is behind, or a branch rule is unmet. |
PULL_REQUEST_STATE_CONFLICTING | Open and no longer merging cleanly into its base, whatever its reviews say. |
ReviewDecision#
ReviewDecision is where a forge says a pull request's reviews stand.
| Value | Description |
|---|---|
REVIEW_DECISION_NONE | The forge has said nothing about the reviews. |
REVIEW_DECISION_PENDING | A review the forge requires that nobody has given. |
REVIEW_DECISION_APPROVED | The forge counts the pull request as approved. |
REVIEW_DECISION_CHANGES_REQUESTED | A reviewer is asking for changes. |
Checks#
Checks is where the checks on a pull request's head commit stand, as the forge last reported them.
| Value | Description |
|---|---|
CHECKS_NONE | The forge reports no checks on the head. |
CHECKS_PENDING | A run is still in flight. |
CHECKS_PASSING | Every check passed. |
CHECKS_FAILING | At least one check failed. |
Mergeability#
Mergeability is where the forge says a pull request stands against its base and its branch rules, as it last computed it.
| Value | Description |
|---|---|
MERGEABILITY_UNKNOWN | The forge has not computed it yet. |
MERGEABILITY_CLEAN | The forge would merge it now. |
MERGEABILITY_UNSTABLE | Its checks are not all passing. |
MERGEABILITY_BLOCKED | A branch rule is unmet, such as a required review. |
MERGEABILITY_BEHIND | The base has moved past the branch. |
MERGEABILITY_CONFLICTING | The branch no longer merges cleanly into its base. |