跳转到内容
EN

List a project's pull requests

Code Mode: praxis.devops.projects.pullRequests.list

HTTP: GET /devops/v1/projects/{project}/pull-requests

Read the pull requests a project’s connected repository holds, most recently updated first, so you can find the one whose gate you must judge, re-decide or merge. Send reviewer to build the “waiting on me” list: it matches only reviewers whose state is requested — asked and not yet answered — never somebody whose review already landed. Narrow it further with filter, one equality term at a time over state, id, number or head (the head commit sha), such as state=open or number=4135; a field outside that set is refused with INVALID_ARGUMENT instead of silently widening the answer. Every item carries the gate that change reached at its head commit, so this list is also the read that shows which changes are waiting on a person. The id in each item is what the retrieve, rerunGate, merge and recordVerdict calls address.

签名

praxis.devops.projects.pullRequests.list(args:{path:{/** e.g. "dvp_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ project:string};query?:{/** e.g. 20 */ pageSize?:number;/** e.g. "pt1.eyJvIjoyMH0" */ pageToken?:string;/** e.g. "createTime desc" */ orderBy?:string;/** e.g. "state=open" */ filter?:string;/** e.g. "sean" */ reviewer?:string;/** e.g. false */ reviewed?:boolean}}):Promise<{/** The pull requests on this page, each carrying the gate it reached at its current head. */ items:Array<{/** The pull request's platform id (pr_…), which the retrieve, rerunGate, merge and recordVerdict calls address; it is not GitHub's pull request number. e.g. "pr_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** The resource type of this answer, always pull_request. */ object:"pull_request";/** RFC 3339 UTC time this platform first projected the pull request. e.g. "2026-11-08T06:30:00Z" */ createTime:string;/** RFC 3339 UTC time GitHub last moved the pull request; the list is ordered by this, newest first. e.g. "2026-11-08T07:02:00Z" */ updateTime:string;/** Canonical Console link for the pull request's project. e.g. "https://console.deepraxis.com/devops/dvp_01m6j8swzteapw2j5sh4" */ viewerUrl:string;/** The project the pull request belongs to, from the project list. e.g. "dvp_01m6j8swzteapw2j5sh4" */ project:string;/** GitHub's own pull request number in the bound repository, which is what the filter number= and the GitHub web address use. e.g. 4135 */ number:number;/** One line saying what the change proposes, exactly as GitHub holds it. e.g. "feat(devops): an environment rolls back to versions it ran before" */ title:string;/** The description as written on GitHub, which is where the praxis declaration block lives; null when nothing was written. e.g. "Closes #1529" */ body?:string|null;/** The people asked to review, and the state of each one's latest review. */ reviewers:Array<{/** The reviewer's GitHub login; it is what the list's reviewer= filter matches. e.g. "sean" */ login:string;/** Where that reviewer stands: still asked and unanswered, or the conclusion of their latest review. e.g. "requested" */ state:"requested"|"approved"|"changes_requested"|"commented"}>;/** GitHub's own address for the pull request, derived from the project's bound repository; empty when the project is bound to none. e.g. "https://github.com/deepraxis/praxis/pull/4135" */ htmlUrl:string;/** Where the pull request stands: still open, merged, or closed without merging. e.g. "open" */ state:"open"|"merged"|"closed";/** True while GitHub holds it as a draft; a draft is still projected and gated but is not something to merge. e.g. false */ draft:boolean;/** The branch the change comes from and the commit the gate and every check are about. */ head:{/** The head branch's name on GitHub. e.g. "feat/run-page-v2" */ ref:string;/** The head commit, which is what headSha and the gate refer to; a new commit here starts a new gate. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ sha:string};/** The branch the change would land on and the commit it was compared against. */ base:{/** The base branch's name on GitHub, for example main. e.g. "main" */ ref:string;/** The base commit GitHub compared the head against; a merge uses the head, never this. e.g. "c8a9a1cf2f1e0d9c8b7a6f5e4d3c2b1a0f9e8d7c" */ sha:string};/** The paths the change touches, which is what the affected-test rule reads to decide which tests a commit needs. */ changedPaths:{/** The repository paths the change touches. e.g. ["services/devops/src/source/gate-run.ts"] */ paths:Array<string>;/** True when GitHub's comparison was cut at its file limit, so paths is known to be incomplete. e.g. false */ truncated:boolean};/** Who opened the change, and whether that account is a person, an agent or a bot. */ author:{/** The author's GitHub login. e.g. "sean" */ login:string;/** What the author's GitHub account is, so an agent's or bot's change can be told from a person's. e.g. "user" */ kind:"user"|"agent"|"bot"};/** The mergeability word, an open set. e.g. "clean" */ mergeableState:string;/** Who this pull request's letters go to — the gate verdict, the merge, the deploy to each integration environment and an integration failure — as the description' e.g. "agent:agent_ebe8605d-0416-4041-b37f-d677be17b91b" */ notify?:string;/** The exposure the description's praxis block declares, or null when the description declares none — which is itself a failed gate check. */ exposure:{/** Which of the four exposures this is; it decides which gate checks the change must satisfy. e.g. "direct" */ kind?:"flag"|"unwired"|"expand-contract"|"direct";/** Why this exposure is the right one, written for unwired and expand-contract; empty for a flag. e.g. "nothing reads it yet" */ reason?:string;/** The flag's key, present only for a flag exposure; it is what the registry and the paired scenarios are checked against. e.g. "run-page-v2" */ flagKey?:string;/** What the flag is for, present only for a flag exposure. e.g. "release" */ flagKind?:"release"|"experiment"|"ops"|"permission";/** RFC 3339 UTC time the flag must be decided by, present only for a flag exposure; an observation that quietly outlives it is a firing condition. e.g. "2026-12-15T23:59:59Z" */ observeUntil?:string;/** Which phase of an expand-contract move this change is, present only for that kind. e.g. "expand" */ phase?:"expand"|"migrate"|"contract"}|{/** Which of the four exposures this is; it decides which gate checks the change must satisfy. e.g. "direct" */ kind?:"flag"|"unwired"|"expand-contract"|"direct";/** Why this exposure is the right one, written for unwired and expand-contract; empty for a flag. e.g. "nothing reads it yet" */ reason?:string;/** The flag's key, present only for a flag exposure; it is what the registry and the paired scenarios are checked against. e.g. "run-page-v2" */ flagKey?:string;/** What the flag is for, present only for a flag exposure. e.g. "release" */ flagKind?:"release"|"experiment"|"ops"|"permission";/** RFC 3339 UTC time the flag must be decided by, present only for a flag exposure; an observation that quietly outlives it is a firing condition. e.g. "2026-12-15T23:59:59Z" */ observeUntil?:string;/** Which phase of an expand-contract move this change is, present only for that kind. e.g. "expand" */ phase?:"expand"|"migrate"|"contract"};gate:{/** The gate's verdict: failed as soon as one check failed, pending while one is still undecided, passed only when every check passed or was skipped. e.g. "pending" */ state:"pending"|"passed"|"failed";/** The commit this gate is about. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ headSha:string;/** Every check the gate made, in the order it made them. */ checks:Array<{/** Which check this is: the declaration itself, one of the flag duties, the affected tests, or the one judgement only a person makes. e.g. "tests" */ name:"exposure-declared"|"flag-registered"|"flag-paired-scenarios"|"removal-ticket"|"tests"|"lockfile"|"exposure-judged"|"owner-approved"|"repo-lint";/** The check's verdict: skipped means the check does not apply to this exposure kind, and pending means its evidence has not arrived yet — which is never treated a e.g. "pending" */ result:"passed"|"failed"|"skipped"|"pending";/** What to do about a failed or pending check, or the gatekeeper's reason for a judgement; absent when the check simply passed. e.g. "no test run has reported for this head commit" */ message?:string;/** Who decided this check: a machine reading the facts, or the one check a person answers. e.g. "machine" */ by:"machine"|"gatekeeper"}>;/** GitHub's id of the "Praxis DevOps / gate" check run this gate reports through, present once GitHub accepted the report. e.g. 1042 */ checkRunId?:number;/** RFC 3339 UTC time the gate first reached passed or failed on this commit; absent while it is pending, and it does not move when the same verdict is recomputed. e.g. "2026-11-08T07:10:00Z" */ decideTime?:string};/** The tickets the description names, split by what it says about them. */ tickets:{/** Tickets the description closes, named as a URL or #number. e.g. ["#1529"] */ closes:Array<string>;/** Tickets the description merely refers to. e.g. ["#1511"] */ refs:Array<string>};/** Where the pull request stands in its (project, base) merge queue; none means it is not in a queue. */ queue:{/** The queue's state for this pull request. e.g. "none" */ state:"none"|"queued"|"building"|"dequeued";/** Why it left the queue, when it was dequeued for a reason worth keeping. e.g. "conflict with the base" */ reason?:string;/** The temporary merge-group commit GitHub built for it, present once the queue is building; the gate is re-decided on this commit. e.g. "5a3b0d2e9f8c7b6a5d4e3f2a1b0c9d8e7f6a5b4c" */ mergeGroupHead?:string;gate?:{/** The gate's verdict: failed as soon as one check failed, pending while one is still undecided, passed only when every check passed or was skipped. e.g. "pending" */ state:"pending"|"passed"|"failed";/** The commit this gate is about. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ headSha:string;/** Every check the gate made, in the order it made them. */ checks:Array<{/** Which check this is: the declaration itself, one of the flag duties, the affected tests, or the one judgement only a person makes. e.g. "tests" */ name:"exposure-declared"|"flag-registered"|"flag-paired-scenarios"|"removal-ticket"|"tests"|"lockfile"|"exposure-judged"|"owner-approved"|"repo-lint";/** The check's verdict: skipped means the check does not apply to this exposure kind, and pending means its evidence has not arrived yet — which is never treated a e.g. "pending" */ result:"passed"|"failed"|"skipped"|"pending";/** What to do about a failed or pending check, or the gatekeeper's reason for a judgement; absent when the check simply passed. e.g. "no test run has reported for this head commit" */ message?:string;/** Who decided this check: a machine reading the facts, or the one check a person answers. e.g. "machine" */ by:"machine"|"gatekeeper"}>;/** GitHub's id of the "Praxis DevOps / gate" check run this gate reports through, present once GitHub accepted the report. e.g. 1042 */ checkRunId?:number;/** RFC 3339 UTC time the gate first reached passed or failed on this commit; absent while it is pending, and it does not move when the same verdict is recomputed. e.g. "2026-11-08T07:10:00Z" */ decideTime?:string}};/** The change's progress through the delivery environments, in order. */ delivery:{/** One entry per environment the change has reached, in environment order. */ stages:Array<{/** The environment's name, from the project's environment list. e.g. "develop" */ environment:string;/** How far the change has got in that environment. e.g. "healthy" */ state:"pending"|"deployed"|"observing"|"healthy"|"rolled_back";/** The release deployed there, when one has been. e.g. "rls_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ release?:string;/** RFC 3339 UTC time that environment reached this state. e.g. "2026-11-08T07:20:00Z" */ time?:string}>};review?:{/** passed when the reviewer found nothing wrong, failed when they found something to fix or roll back. e.g. "failed" */ result:"passed"|"failed";/** What the reviewer found, in a sentence a reader can act on. e.g. "The retry loop does not stop on a 4xx answer." */ reason:string;by:{/** What sort of actor this is, which decides how the id should be read. e.g. "user" */ kind:"user"|"agent"|"system";/** Identifier of the actor within its kind, such as a user id for a person. e.g. "usr_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** Display name for the actor at the time, so a record reads the way it did when it was written; absent when none was known. e.g. "Sean" */ label?:string};/** The commit the review is about. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ headSha:string;/** RFC 3339 UTC time the verdict was recorded. e.g. "2026-11-24T09:30:00Z" */ time:string;/** True when the pull request had already merged when the verdict was recorded; a failed verdict with merged true is a finding. e.g. true */ merged:boolean};/** The commit it landed as, present only once it is merged. e.g. "c8a9a1cf2f1e0d9c8b7a6f5e4d3c2b1a0f9e8d7c" */ mergeCommitSha?:string;/** RFC 3339 UTC time it was merged, present only once it is merged. e.g. "2026-11-04T02:00:00Z" */ mergeTime?:string;/** RFC 3339 UTC time it was closed without merging, present only when it was closed that way. e.g. "2026-11-04T02:00:00Z" */ closeTime?:string;/** The affected test runs reported at the head commit, newest first; present only when the read asked for expand=runs. */ runs?:Array<string>}>;/** Cursor for the next page; an empty string means this was the last page, which is the only signal a list is finished. e.g. "pt1.eyJvIjo1MH0" */ nextPageToken:string}>;

参数

名称位置类型必填说明
projectpathstring是Identifies the project whose data you are reading, from the project list or create answer.
pageSizequerynumber否How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone.
pageTokenquerystring否The cursor from the previous page’s nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page.
orderByquerystring否Comma-separated fields to order by, each optionally suffixed with desc, for example createTime desc. Only the fields the resource declares are accepted; anything else is refused so an ordering typo cannot silently return a different order. Omitted uses the resource’s own order.
filterquerystring否AIP-160 equality filter over one declared field at a time: state, id, number or head. state=open lists the ones still open, number=4135 finds the pull request with that GitHub number, and any other field, or an operator other than =, is refused with INVALID_ARGUMENT.
reviewerquerystring否A GitHub login to build the “waiting on me” list: only pull requests where that person is a requested reviewer and has not answered yet are returned. Somebody who already approved, requested changes or commented is no longer waiting on, so they do not appear.
reviewedqueryboolean否Review is after-the-fact sampling (Sean 2026-11-24). false lists the pull requests nobody has recorded a review verdict for — send it with filter state=merged to get the merged pull requests still waiting for a sample; true lists the ones that have a review. Omit it to ignore reviews.

响应

状态码内容类型说明
200application/jsonOne page of the project’s pull requests, most recently updated first; each carries its exposure declaration, its gate and its delivery progress.
400application/jsonINVALID_PARAMS or INVALID_ARGUMENT means a field, query value or identifier violates the documented format or range — an unknown enum value, a pageSize outside 1..100, an unsupported filter or orderBy field, or an id with the wrong prefix. Correct the named input; nothing was read or written.
401application/jsonThe API key is missing or invalid; send a valid Praxis API key in the Authorization header before retrying.
403application/jsonThe credential carries no organization, or that organization cannot reach this project; use a key belonging to the project’s organization. No cross-organization read is possible.
404application/jsonPROJECT_NOT_FOUND means no project with that id is visible to this organization; list the projects and use an id from that answer.
500application/jsonINTERNAL means the service could not complete the request; retry once, and if it repeats report the request id. A read is safe to repeat; a write that failed this way should be re-read before it is sent again.