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}/trustTL;DR
| Question | Answer |
|---|---|
| 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
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
id | string | yes | GitHub's id. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The trusted publisher. | GithubTrust |
| 401 | Not signed in. | ErrorResponse |
| 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. | ErrorResponse |
| 404 | No such organisation or repository (github.repository_not_found). | ErrorResponse |
| 409 | The installation is suspended on GitHub (github.suspended). | ErrorResponse |
| 429 | Too many requests, or GitHub asked to wait (github.rate_limited). | ErrorResponse |
| 502 | GitHub could not be reached (github.unavailable). | ErrorResponse |
| 503 | The 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.
| Field | Type | Required | Description |
|---|---|---|---|
trustedPublisher | object | null | yes | The trusted publisher, or null when the organisation has twenty already. |
trustedPublisher.id | string | yes | |
trustedPublisher.name | string | yes | |
trustedPublisher.created | boolean | yes | |
workflow | string | yes | The workflow file it trusts: the repository's own Plotwork workflow, else diagrams.yml. |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |