@@ -201,6 +201,21 @@ between minor releases. |
| 201 | `0069_user_gpg_subkeys.sql`, | 201 | `0069_user_gpg_subkeys.sql`, |
| 202 | `0070_commit_verification_cache.sql`. | 202 | `0070_commit_verification_cache.sql`. |
| 203 | - **Capability:** `gpg-keys` added to `/api/v1/meta`. | 203 | - **Capability:** `gpg-keys` added to `/api/v1/meta`. |
| | 204 | +- **REST: rulesets (S50 §9).** Three read-only endpoints |
| | 205 | + synthesizing GitHub's modern rulesets shape from shithub's |
| | 206 | + existing `branch_protection_rules` rows: |
| | 207 | + `GET /api/v1/repos/{o}/{r}/rulesets` (list), |
| | 208 | + `GET /api/v1/repos/{o}/{r}/rulesets/{id}` (single), |
| | 209 | + `GET /api/v1/repos/{o}/{r}/rules/branches/{branch}` (rules |
| | 210 | + applying to a branch — every matching pattern, not just the |
| | 211 | + longest-match the pre-receive enforcer uses). One protection |
| | 212 | + row maps to one ruleset; each configured field projects as a |
| | 213 | + typed rule (`pull_request`, `non_fast_forward`, `deletion`, |
| | 214 | + `required_signatures`, `required_status_checks`). Scope: |
| | 215 | + `repo:read`. Cross-repo lookups 404. Mutating rulesets via |
| | 216 | + REST is a future surface — for now use the web UI at |
| | 217 | + `Settings → Branches`. |
| | 218 | +- **Capability:** `rulesets` added to `/api/v1/meta`. |
| 204 | - **REST: repo contents (S50 §12).** | 219 | - **REST: repo contents (S50 §12).** |
| 205 | `GET /api/v1/repos/{o}/{r}/contents/{path}[?ref=]` returns | 220 | `GET /api/v1/repos/{o}/{r}/contents/{path}[?ref=]` returns |
| 206 | either a directory listing (dirs first, then files | 221 | either a directory listing (dirs first, then files |