Skip to content

Test and connect a GitHub repository for issues

PUT
/v1/projects/{id}/integrations/github-issues
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.

id
required
string

An id from GET /v1/projects

Media type application/json
object
repository
required

owner/name of the repository.

string
/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9._-]{1,100}$/
token

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.

string
>= 1 characters <= 1024 characters
Example
{
"repository": "acme/shop",
"token": "github_pat_EXAMPLE_not_a_real_token_0000000000000000000000"
}

Connected

Media type application/json
object
connection
required
object
repository
required
string
state
required
string
Allowed values: working rejected error paused no_token
stateReason
required
string
nullable
checkedAt
required
string format: date-time
nullable
lastReadAt
required
string format: date-time
nullable
connectedBy
required
string
connectedAt
required
string format: date-time
disconnectedBy
required
string
nullable
disconnectedAt
required
string format: date-time
nullable
poll
required
object
enabled
required
boolean
label
required
string
nullable
intervalMinutes
required
integer
nextPollAt
required
string format: date-time
nullable
running
required
boolean
lastPolledAt
required
string format: date-time
nullable
last
required

What the last pass did - the shape of Jira’s poll outcome.

object
paidOnly
required
boolean
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)

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No / invalid session — a CLI token is refused here

Media type application/json
object
error
required
string
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

Media type application/json
object
error
required
string
Example
{
"error": "project owner only"
}

The connection changed while it was being checked

Media type application/json
object
error
required
string
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).

Media type application/json
object
ok
required
boolean
steps
required
Array<object>
object
step
required
string
Allowed values: repository issues
result
required
string
Allowed values: ok failed skipped
code
string
Allowed values: rejected forbidden unavailable busy invalid unreachable redirect too_large issues_disabled
retryAfterSec
integer
testedAt
required
string format: date-time
error
string
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.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over

The server has no INTEGRATIONS_ENCRYPTION_KEY; GitHub was not asked

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}