Files
solutions/README.md
Nikolay Buslaev 2b954419de Add language links and translate README to English
- Add link to Russian version at the beginning of README.md
- Add link to English version at the beginning of README-rus.md
- Translate README content from Russian to English
2026-03-12 14:34:27 +01:00

54 lines
1.9 KiB
Markdown

[Russian version](README-rus.md)
# Setting Up a Technical Account for Code Review
## 1. Create a Local User in Gitea
Create a local user in Gitea with the recommended name: `kodobot`
## 2. Save the Temporary Password
When creating the user, set a temporary password and store it in a secure location.
## 3. Generate a PAT with Minimal Permissions
Generate a Personal Access Token (PAT) with the minimum required permissions using the PowerShell script `Create-PAT.ps1`.<br>
Save the returned PAT value in a secure location.
## 4. Change the Password of the Created User
After successfully creating the PAT, change the password of the created user for security.
## 5. Configure Organization Secrets and Variables
At the organization level, define the secrets and variables necessary for the Code Reviewer to function.
### Secrets
- `CC_GITEATOKEN` — PAT of the `reviewer` user
- `CC_API_KEY` — authorization key for LLM OpenAI API (`sk-***`)
### Variables
- `CC_BASE_URL` — URL of LiteLLM Proxy (default: `http://llm.developertools.com`)
- `CC_MODEL` — default model (default: `/int/reviewer/default`)
### Applying Settings
Configure secrets and variables at the organization level using the script `Set-GiteaOrgActionItem.ps1`.<br>
First, define the environment variable: `$Env:AdminGiteaManagePAT`
**Example PowerShell command:**
```powershell
$Env:AdminGiteaManagePAT = "your-token"
$Org = "wyn-core"
.\Set-GiteaOrgActionItem.ps1 -Org $Org -VarName "CC_BASE_URL" -Value "https://llm.developertools.pro/"
.\Set-GiteaOrgActionItem.ps1 -Org $Org -VarName "CC_MODEL" -Value "/int/reviewer/default"
.\Set-GiteaOrgActionItem.ps1 -Org $Org -VarName "CC_GITEATOKEN" -Password "f79....c1c"
.\Set-GiteaOrgActionItem.ps1 -Org $Org -VarName "CC_API_KEY" -Password "sk-F..6-k..g"
```
## 6. Grant Access to the `kodobot` User
Add the user at the organization level to the Developers group or at the repository level to Collaborators with write permissions