Test and connect a GitHub repository for issues
const url = 'https://beta-api.plune.ai/v1/projects/example/integrations/github-issues';const options = { method: 'PUT', headers: { cookie: 'plune_session=<plune_session>', 'Content-Type': 'application/json' }, body: '{"repository":"acme/shop","token":"github_pat_EXAMPLE_not_a_real_token_0000000000000000000000"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://beta-api.plune.ai/v1/projects/example/integrations/github-issues \ --header 'Content-Type: application/json' \ --cookie plune_session=<plune_session> \ --data '{ "repository": "acme/shop", "token": "github_pat_EXAMPLE_not_a_real_token_0000000000000000000000" }'The owner’s (ADR 0083 §6, Е): repository as owner/name and a fine-grained token of its own - not the CI’s - with Issues: Read and write on that repository. Two checks: repository - GET /repos/{owner}/{repo} signs in and sees it (its numeric id is kept as the place of its mirrors), and issues - GET /repos/{owner}/{repo}/issues?per_page=1 (Issues: read). Issues: write cannot be checked without writing; the first create says it. Nothing is saved unless both pass (422 with the steps). The token is sealed under INTEGRATIONS_ENCRYPTION_KEY with the project and the source (Ж) and is in no answer. In an edit of the same repository token may be left out. Ten checks a minute a project (429). Audited as tracker_connection.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”An id from GET /v1/projects
Request Body required
Section titled “Request Body required ”object
owner/name of the repository.
A fine-grained token with Issues: Read and write on the repository, not the CI’s. May be left out of an edit of the same repository.
Example
{ "repository": "acme/shop", "token": "github_pat_EXAMPLE_not_a_real_token_0000000000000000000000"}Responses
Section titled “ Responses ”Connected
object
object
object
What the last pass did - the shape of Jira’s poll outcome.
object
Example
{ "connection": { "repository": "acme/shop", "state": "working", "stateReason": null, "checkedAt": "2026-09-16T09:12:04.151Z", "lastReadAt": "2026-09-16T09:12:04.151Z", "connectedBy": "u-shop", "connectedAt": "2026-09-16T09:12:04.151Z", "disconnectedBy": null, "disconnectedAt": null, "poll": { "enabled": true, "label": "plune", "intervalMinutes": 15, "nextPollAt": "2026-09-16T09:12:04.151Z", "running": false, "lastPolledAt": null, "last": null } }, "paidOnly": false}Invalid body, or no token where none is saved for this repository (or GitHub rejected the saved one)
object
Example generated
{ "error": "example"}No / invalid session — a CLI token is refused here
object
Example
{ "error": "sign in required"}Not the project’s owner; or (with TIER_LIMITS_ENFORCE=true) a tier without the issue_trackers permission, with feature and tier
object
Example
{ "error": "project owner only"}The connection changed while it was being checked
object
Example generated
{ "error": "example"}A check failed; nothing was saved. A failed step carries one code - never what GitHub wrote: rejected (401), forbidden (403), unavailable (404/410: no such repository for this token), busy (403/429 of a rate limit, retryAfterSec from retry-after or x-ratelimit-reset), invalid, unreachable (5xx, the network, 15 s), redirect, too_large, issues_disabled (the repository has Issues off).
object
object
Example
{ "error": "the connection did not pass its checks — nothing was saved", "ok": false, "steps": [ { "step": "repository", "result": "failed", "code": "rejected" }, { "step": "issues", "result": "skipped" } ], "testedAt": "2026-09-16T09:12:04.151Z"}Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over
The server has no INTEGRATIONS_ENCRYPTION_KEY; GitHub was not asked
object
Example generated
{ "error": "example"}