From dec2881ee62988cda1d6b942b9e983bafba4214a Mon Sep 17 00:00:00 2001 From: Alexey Efimchik Date: Thu, 12 Mar 2026 16:04:02 +0700 Subject: [PATCH] Added DevopsTeam Section --- DevOps Team/reviewer-token.md | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 DevOps Team/reviewer-token.md diff --git a/DevOps Team/reviewer-token.md b/DevOps Team/reviewer-token.md new file mode 100644 index 0000000..0379294 --- /dev/null +++ b/DevOps Team/reviewer-token.md @@ -0,0 +1,37 @@ +# Gitea Token Setup for AI Code Reviewer + +## Required Token Permissions + +| Permission | Level | Reason | +|---|---|---| +| **repository** | Read and Write | Read PR details, branches, diff; post review comments | +| **issue** | Read and Write | Create and delete progress comments on PRs (Gitea treats PR comments as issues internally) | +| **user** | Read | Fetch current bot user info to verify reviewer assignment | + +All other permissions (`activitypub`, `misc`, `notification`, `organization`, `package`) should be set to **No Access**. + +## How to Generate the Token + +1. Log in to Gitea as the **bot account** that will be assigned as a reviewer +2. Go to **Settings** → **Applications** (top right avatar → Settings → Applications) +3. Under **Manage Access Tokens** click **Generate Token** +4. Fill in: + - **Token Name**: `ai-code-reviewer` (or any descriptive name) + - **Expiration**: set according to your security policy +5. Set permissions as described in the table above +6. Click **Generate Token** +7. **Copy the token immediately** — it will not be shown again + +## Adding the Token to Your Repository + +1. Go to your repository → **Settings** → **Secrets** +2. Click **Add Secret** +3. Set: + - **Name**: `CC_GITEATOKEN` + - **Value**: paste the token generated above +4. Click **Save** + +## Important Notes + +- The token must belong to the account that is **assigned as a reviewer** on pull requests — this is how the reviewer verification check works +- Treat the token as a password — never commit it to the repository \ No newline at end of file