docs: add Forgejo pulls CLI client tea documentation
This commit is contained in:
parent
4f3da7e36e
commit
c868ff7e29
1 changed files with 34 additions and 0 deletions
|
|
@ -153,3 +153,37 @@ Exposes browser automation tools (take screenshots, click, type, fill forms).
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Managing Pull Requests via CLI (Forgejo Client)
|
||||||
|
|
||||||
|
To manage repositories, issues, and pull requests directly from your terminal (similar to GitHub CLI `gh`), you can use **`tea`**, the official Gitea CLI client. Since Forgejo is a fork of Gitea and shares the exact same REST API, `tea` is fully compatible out-of-the-box.
|
||||||
|
|
||||||
|
### 3.1. Installing tea on your workstation
|
||||||
|
For Linux systems, you can download the latest precompiled binary:
|
||||||
|
```bash
|
||||||
|
# Download and install the precompiled binary
|
||||||
|
curl -L -sS https://gitea.com/gitea/tea/releases/download/v0.9.2/tea-0.9.2-linux-amd64 -o /tmp/tea
|
||||||
|
sudo mv /tmp/tea /usr/local/bin/tea
|
||||||
|
sudo chmod +x /usr/local/bin/tea
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3.2. Authenticating tea with your Forgejo instance
|
||||||
|
Configure a login profile for your server:
|
||||||
|
```bash
|
||||||
|
tea login add \
|
||||||
|
--name forgejo \
|
||||||
|
--url https://git.gaboggamer.online \
|
||||||
|
--token <YOUR_FORGEJO_PERSONAL_ACCESS_TOKEN>
|
||||||
|
```
|
||||||
|
*Note: You can generate a Personal Access Token in the Forgejo Web UI under Settings ➔ Applications.*
|
||||||
|
|
||||||
|
### 3.3. Standard PR commands
|
||||||
|
With `tea` configured, you can manage pull requests directly from the repository root:
|
||||||
|
* **List open PRs**: `tea pulls ls`
|
||||||
|
* **Checkout a PR locally**: `tea pulls checkout <PR_NUMBER>`
|
||||||
|
* **Create a new PR**: `tea pulls create --title "My PR" --base main --head my-feature`
|
||||||
|
* **Merge a PR**: `tea pulls merge <PR_NUMBER>`
|
||||||
|
* **Approve/Review a PR**: `tea pulls review <PR_NUMBER> --approve`
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue