From 6632d38fe2393507cafaa068281cd643d21a7242 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 1 Nov 2026 18:19:38 +0000 Subject: [PATCH] Document the commitstatus token scope (#622) Documents https://github.com/go-gitea/gitea/pull/40144 for main, which adds `read:commitstatus` and `write:commitstatus` token scopes so CI integrations can report commit statuses without full repository access. The repository scopes include them. Adds the scope to the OAuth2 provider scope table and the API usage permission list. Draft until the Gitea PR merges. _Written by Claude (Opus 5.5)._ --------- Co-authored-by: Lunny Xiao Reviewed-on: https://gitea.com/gitea/docs/pulls/622 Reviewed-by: Lunny Xiao Co-authored-by: silverwind --- docs/development/api-usage.md | 1 + docs/development/oauth2-provider.md | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/development/api-usage.md b/docs/development/api-usage.md index 6a01efa8..cad53cdb 100644 --- a/docs/development/api-usage.md +++ b/docs/development/api-usage.md @@ -73,6 +73,7 @@ By default, this creates a token with very limited permissions. To complete your - `activitypub` - `admin` +- `commitstatus` (included in `repository`) - `issue` - `misc` - `notification` diff --git a/docs/development/oauth2-provider.md b/docs/development/oauth2-provider.md index c2aecaad..2e70c02f 100644 --- a/docs/development/oauth2-provider.md +++ b/docs/development/oauth2-provider.md @@ -111,6 +111,9 @@ Gitea token scopes are as follows: | **admin** | `/admin/*` API routes: Site-wide administrative operations (hidden for non-admin accounts). | |     **read:admin** | Grants read access for admin operations, such as getting cron jobs or registered user emails. | |     **write:admin** | Grants read/write/delete access for admin operations, such as running cron jobs or updating user accounts. | +| **commitstatus** | `/repos/{owner}/{repo}/statuses/{sha}` and `/repos/{owner}/{repo}/commits/{ref}/status(es)` API routes: Commit status operations. | +|     **read:commitstatus** | Grants read access to commit statuses. Included in `read:repository`. | +|     **write:commitstatus** | Grants read/write access to commit statuses, such as reporting CI results. Included in `write:repository`. | | **issue** | `issues/*`, `labels/*`, `milestones/*` API routes: Issue-related operations. | |     **read:issue** | Grants read access for issues operations, such as getting issue comments, issue attachments, and milestones. | |     **write:issue** | Grants read/write/delete access for issues operations, such as posting or editing an issue comment or attachment, and updating milestones. |