Skip to content

Which repository to default to

GET
/v1/github/default-repository/suggestion
curl --request GET \
--url https://api.pealboard.com/v1/github/default-repository/suggestion \
--header 'Authorization: Bearer <token>'

Proposes the repository a workspace should send an issue to when nobody chose one, and where to create it if there is nothing to propose. Set the choice with PATCH /v1/workspace.

The suggestion is, in order: a synced repository named issues, roadmap, product, planning, tracker, support (case-insensitive), which is what a team that keeps one tracking repository calls it; failing that, the synced repository with the most open issues in the cache; failing both, null. A tie on the count is broken by full name, so two reads of the same screen agree.

Pealboard does not create the repository, and cannot. The App does not ask GitHub for the Administration permission — a product that can create repositories in a customer’s organization is asking for a permission every reviewer has to justify, for one screen. createUrl opens GitHub’s own new-repository form with the name filled in, on the organization when the installation is on one and on github.com/new when it is on a personal account. A repository created there appears here after it is added to the installation’s repository access and the next sync has run; it is not immediate, and nothing is wrong while it is not there yet.

Access. Requires the member role or above (member, admin, owner). Which repository a workspace should send issues to is a reading of repositories every member can already list. API-key scope: github:read.

The suggestion, and where to create one.

Media typeapplication/json
object
suggested
required

Null when no synced repository is named like a tracking repository and the cache holds no open issues yet.

object
id
required

A UUID this API issued.

string format: uuid
fullName
required
string
reason
required

Why this one, in a sentence a screen can show unchanged.

string
createUrl
required

GitHub’s new-repository form, with the name filled in.

string format: uri
createName
required

The name Pealboard proposes for it.

string
Example
{
"suggested": {
"fullName": "mersoft-corp/issues",
"reason": "Named issues, which is the usual name for a repository a team tracks work in."
},
"createName": "issues"
}

No valid credentials.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

Authenticated, but not permitted.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

No such resource, or it is not visible to you.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

The request conflicts with the current state.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

The request did not match the expected shape.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

Rate limited. Retry after the interval in the header.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

GitHub or another dependency refused or did not answer. Nothing in the workspace changed.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}