Skip to content
Connect an agent

Organisations

Register CI for a repository without changing it

Adds the trusted publisher alone, for the repository's own Plotwork workflow file or diagrams.yml, with GitHub ids pinned, and opens no pull request.

POST/orgs/{org}/github/repositories/{id}/trust

TL;DR

QuestionAnswer
What does it do?Register CI for a repository without changing it.
What does it take?org, id in the path.
What does it return?Status 200 with a body of type GithubTrust.
What can go wrong?401 not signed in; 403 a member may not (orgs.forbidden), the plan has no GitHub App (plan.github_app_not_included), or the request came from an origin that may not make changes; 404 no such organisation or repository (github.repository_not_found); 409 the installation is suspended on GitHub (github.suspended); 429 too many requests, or GitHub asked to wait (github.rate_limited); 502 GitHub could not be reached (github.unavailable); 503 the GitHub App is not set up on this server (github.not_configured), or organisations are not. Every failure uses the one error envelope.

What it does

Adds the trusted publisher alone, for the repository's own Plotwork workflow file or diagrams.yml, with GitHub ids pinned, and opens no pull request. The owner and an admin, on Pro and Enterprise.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.
idstringyesGitHub's id.

Responses

StatusMeaningBody
200The trusted publisher.GithubTrust
401Not signed in.ErrorResponse
403A member may not (orgs.forbidden), the plan has no GitHub App (plan.github_app_not_included), or the request came from an origin that may not make changes.ErrorResponse
404No such organisation or repository (github.repository_not_found).ErrorResponse
409The installation is suspended on GitHub (github.suspended).ErrorResponse
429Too many requests, or GitHub asked to wait (github.rate_limited).ErrorResponse
502GitHub could not be reached (github.unavailable).ErrorResponse
503The GitHub App is not set up on this server (github.not_configured), or organisations are not.ErrorResponse

Response body

A 200 answer has the type GithubTrust.

FieldTypeRequiredDescription
trustedPublisherobject | nullyesThe trusted publisher, or null when the organisation has twenty already.
trustedPublisher.idstringyes
trustedPublisher.namestringyes
trustedPublisher.createdbooleanyes
workflowstringyesThe workflow file it trusts: the repository's own Plotwork workflow, else diagrams.yml.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools