List pull requests linked to a task
The GitHub pull requests linked to this task, with their state, CI result, review decision and preview deploy, kept up to date by GitHub webhooks. Needs the PerspecTask GitHub app installed on the repository (Account → GitHub in the web app).
The GitHub pull requests linked to this task, with their state, CI result, review decision and preview deploy, kept up to date by GitHub webhooks. Needs the PerspecTask GitHub app installed on the repository (Account → GitHub in the web app).
Authorization
bearerAuth Your PerspecTask API key (starts with pt_live_). Each key carries scopes: tasks:read (GET), tasks:write (full create/update), and tasks:write:meta (create/update everything EXCEPT editing title/description of existing tasks — for automation that manages workflow without rewriting human-authored content).
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/tasks/string/pull-requests"[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"repo": "octocat/hello-world",
"number": 0,
"title": "string",
"url": "string",
"state": "open",
"draft": true,
"checks": "pending",
"review": "approved",
"preview_url": "string",
"preview_status": "building",
"linked_by": "auto"
}
]Update a task PATCH
Previous Page
Link a pull request to a task POST
Link a PR by its URL. Usually unnecessary: a PR whose title, branch or description contains the task's `pr_token` links itself. Linking an already-linked PR refreshes it. Needs the PerspecTask GitHub app installed on the repository (Account → GitHub in the web app). Answers 404 with `code: "not_installed"` when the app isn't on that repository or your GitHub account can't read it.