Comment on an issue
const url = 'https://api.pealboard.com/v1/issues/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/comments';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"body":"example","visibility":"internal","portalId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pealboard.com/v1/issues/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/comments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "body": "example", "visibility": "internal", "portalId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'visibility: "internal" posts an ordinary GitHub comment that no customer ever sees.
visibility: "public" is Reply to portal: the same GitHub comment with a hidden marker appended, and that marker is the only thing that makes it visible to customers of the named portal. Nothing typed into GitHub reaches a customer without it. A public comment needs portalId, because a marker names one portal and an issue can be shared to several.
Access. Requires the member role or above (member, admin, owner). Commenting writes to the customer’s GitHub repository under their installation. API-key scope: issues:write.
Billing. Refused with 402 while the workspace’s billing has lapsed. Reads continue and nothing is deleted.
Retries. Send Idempotency-Key and a retry with the same key within 24 hours returns the first answer rather than acting twice.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”From GET /v1/issues.
From GET /v1/issues.
Request Body
Section titled “Request Body”object
public means a customer of the named portal can see it. Every other comment is internal and never reaches a customer.
Required when visibility is public. The portal whose customers will see it.
Responses
Section titled “Responses”The comment.
object
A UUID this API issued.
A UUID this API issued.
What the person typed. The attribution footer and the marker are stripped here and kept on GitHub; sending an edited body back keeps them.
object
GitHub’s numeric user id.
User, Bot or Organization.
object
A UUID this API issued.
The display name. Never an email address.
team: a workspace member, the same word a portal uses for the same people. customer: a portal customer, whose request or comment the App wrote on their behalf; membershipId is null.
public means a customer of the named portal can see it. Every other comment is internal and never reaches a customer.
Set when the comment was written in a portal by a customer.
Example
{ "authoredBy": { "kind": "team" }, "visibility": "internal"}No valid credentials.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}The workspace’s billing has lapsed, so writes are refused.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}Authenticated, but not permitted.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}No such resource, or it is not visible to you.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}The request conflicts with the current state.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}The request did not match the expected shape.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}Rate limited. Retry after the interval in the header.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
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.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}