Organisations
Read an organisation's style rules
The saved style rules, as written and parsed, whether CI applies them (rules are saved and the owner's plan includes them), whether the caller may change them, and the plan.
GET
/orgs/{org}/style-rulesTL;DR
| Question | Answer |
|---|---|
| What does it do? | Read an organisation's style rules. |
| What does it take? | org in the path. |
| What does it return? | Status 200 with a body of type OrgStyleRules. |
| What can go wrong? | 401 not signed in, or the key is not valid; 404 no such organisation, the caller is not a member of it, or the key is another organisation's; 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope. |
What it does
The saved style rules, as written and parsed, whether CI applies them (rules are saved and the owner's plan includes them), whether the caller may change them, and the plan. Every member may read them, and so may a key of the organisation, which is how the CLI and the GitHub Action read them.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The rules. | OrgStyleRules |
| 401 | Not signed in, or the key is not valid. | ErrorResponse |
| 404 | No such organisation, the caller is not a member of it, or the key is another organisation's. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | Organisations are not set up on this server. | ErrorResponse |
Response body
A 200 answer has the type OrgStyleRules.
| Field | Type | Required | Description |
|---|---|---|---|
rules | StyleRules | null | yes | The saved rules as the engine read them (the format of docs/architecture/repository-settings.md), or null when none are saved. |
text | string | null | yes | The saved rules as the person wrote them, or null. |
active | boolean | yes | True when rules are saved and the owner's plan includes saved style rules, so CI that reads them applies them. |
canEdit | boolean | yes | True when the caller's role may save and remove the rules. |
plan | "free" | "pro" | "enterprise" | yes | The organisation's plan, which is its owner's. |
updatedAt | integer | null | yes | When the rules were last saved, in milliseconds since the epoch, or null. |
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 |