gitea
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitea
Gitea
Interact with a Gitea instance using — a drop-in replacement for that adds project board (kanban) management.
exteatea使用与Gitea实例进行交互——是的直接替代品,新增了项目看板(kanban)管理功能。
exteaexteateaAuthentication
认证
- Use (or
--login <name>) for all commands to select a login profile.-l <name> - Board password is stored in alongside the login. Can also be set via
~/.config/tea/config.ymlenv var.GITEA_PASSWORD - For git push/pull over HTTP, embed the token in the URL:
http://user:TOKEN@<host>/owner/repo.git - Run to create a login (API token + optional board password).
extea login add
- 所有命令均可使用(或简写
--login <name>)来选择登录配置文件。-l <name> - 看板密码与登录信息一同存储在中,也可通过
~/.config/tea/config.yml环境变量设置。GITEA_PASSWORD - 如需通过HTTP执行git push/pull操作,请将token嵌入URL:
http://user:TOKEN@<host>/owner/repo.git - 运行创建登录凭证(API token + 可选的看板密码)。
extea login add
Repos
仓库
bash
extea repos list -l <login>
extea repos create --name <name> --description "<desc>" -l <login>
extea repos delete --name <name> --owner <owner> --force -l <login>bash
extea repos list -l <login>
extea repos create --name <name> --description "<desc>" -l <login>
extea repos delete --name <name> --owner <owner> --force -l <login>Issues
Issue
bash
extea issues list -l <login>
extea issues create -l <login> --title "<title>" --description "<desc>" \
--labels "<label1>,<label2>" --milestone "<milestone>" --assignees "<user>"
extea issues close -l <login> <number>
extea issues reopen -l <login> <number>bash
extea issues list -l <login>
extea issues create -l <login> --title "<title>" --description "<desc>" \
--labels "<label1>,<label2>" --milestone "<milestone>" --assignees "<user>"
extea issues close -l <login> <number>
extea issues reopen -l <login> <number>Pull Requests
Pull Requests
bash
extea pulls list -l <login>
extea pulls create -l <login> --title "<title>" --description "<desc>" \
--head <branch> --base main --labels "<labels>" --milestone "<ms>"
extea pulls merge -l <login> <number>
extea pulls close -l <login> <number>bash
extea pulls list -l <login>
extea pulls create -l <login> --title "<title>" --description "<desc>" \
--head <branch> --base main --labels "<labels>" --milestone "<ms>"
extea pulls merge -l <login> <number>
extea pulls close -l <login> <number>Labels
标签
bash
extea labels list -l <login>
extea labels create -l <login> --name "<name>" --color "#hexcolor" --description "<desc>"
extea labels delete -l <login> <id>bash
extea labels list -l <login>
extea labels create -l <login> --name "<name>" --color "#hexcolor" --description "<desc>"
extea labels delete -l <login> <id>Milestones
里程碑
bash
extea milestones list -l <login>
extea milestones create -l <login> --title "<title>" --description "<desc>" --deadline "<YYYY-MM-DD>"
extea milestones close -l <login> <name>bash
extea milestones list -l <login>
extea milestones create -l <login> --title "<title>" --description "<desc>" --deadline "<YYYY-MM-DD>"
extea milestones close -l <login> <name>Releases
版本发布
bash
extea releases list -l <login>
extea releases create -l <login> --tag <tag> --title "<title>" --note "<body>"bash
extea releases list -l <login>
extea releases create -l <login> --tag <tag> --title "<title>" --note "<body>"Comments
评论
bash
extea comment -l <login> <issue-number> "<comment text>"bash
extea comment -l <login> <issue-number> "<comment text>"Notifications
通知
bash
extea notifications -l <login>bash
extea notifications -l <login>API (raw endpoint access)
API(原始端点访问)
bash
extea api -l <login> <endpoint>
extea api -l <login> -X POST <endpoint> -f key=valuebash
extea api -l <login> <endpoint>
extea api -l <login> -X POST <endpoint> -f key=valueProject Boards
项目看板
Board commands use web session auth (password stored in config or env var) because Gitea has no REST API for project boards.
GITEA_PASSWORD看板命令使用Web会话认证(密码存储在配置中或通过环境变量设置),因为Gitea没有针对项目看板的REST API。
GITEA_PASSWORDProjects (projects
, project
, p
)
projectsprojectp项目(projects
、project
、p
)
projectsprojectpbash
undefinedbash
undefinedList projects
List projects
extea projects -l <login> -r owner/repo
extea projects ls --state all -l <login> -r owner/repo
extea projects -l <login> -r owner/repo
extea projects ls --state all -l <login> -r owner/repo
View kanban board
View kanban board
extea projects view <id> -l <login> -r owner/repo
extea projects view <id> -l <login> -r owner/repo
Create (templates: kanban, triage, none)
Create (templates: kanban, triage, none)
extea projects create -t "<title>" --template kanban -l <login> -r owner/repo
extea projects create -t "<title>" --template kanban -l <login> -r owner/repo
Edit / close / reopen / delete
Edit / close / reopen / delete
extea projects edit <id> -t "<new title>" -l <login> -r owner/repo
extea projects close <id> -l <login> -r owner/repo
extea projects open <id> -l <login> -r owner/repo
extea projects delete <id> -l <login> -r owner/repo
extea projects edit <id> -t "<new title>" -l <login> -r owner/repo
extea projects close <id> -l <login> -r owner/repo
extea projects open <id> -l <login> -r owner/repo
extea projects delete <id> -l <login> -r owner/repo
Assign issues to a project board
Assign issues to a project board
extea projects assign <project-id> -i <issue-num> -i <issue-num> -l <login> -r owner/repo
extea projects assign <project-id> -i <issue-num> -i <issue-num> -l <login> -r owner/repo
Remove issues from a project
Remove issues from a project
extea projects unassign -i <issue-num> -l <login> -r owner/repo
extea projects unassign -i <issue-num> -l <login> -r owner/repo
Move issues between columns
Move issues between columns
extea projects move <project-id> --column <col-id> -i <issue-num> -l <login> -r owner/repo
undefinedextea projects move <project-id> --column <col-id> -i <issue-num> -l <login> -r owner/repo
undefinedColumns (columns
, column
, col
)
columnscolumncol列(columns
、column
、col
)
columnscolumncolbash
undefinedbash
undefinedList columns in a project
List columns in a project
extea columns ls -p <project-id> -l <login> -r owner/repo
extea columns ls -p <project-id> -l <login> -r owner/repo
Create a column
Create a column
extea columns create -p <project-id> -t "<title>" --color "#hexcolor" -l <login> -r owner/repo
extea columns create -p <project-id> -t "<title>" --color "#hexcolor" -l <login> -r owner/repo
Edit a column
Edit a column
extea columns edit -p <project-id> -c <col-id> -t "<new title>" -l <login> -r owner/repo
extea columns edit -p <project-id> -c <col-id> -t "<new title>" -l <login> -r owner/repo
Delete a column (issues move to default)
Delete a column (issues move to default)
extea columns delete -p <project-id> -c <col-id> -l <login> -r owner/repo
extea columns delete -p <project-id> -c <col-id> -l <login> -r owner/repo
Set default column
Set default column
extea columns default -p <project-id> -c <col-id> -l <login> -r owner/repo
extea columns default -p <project-id> -c <col-id> -l <login> -r owner/repo
Reorder columns
Reorder columns
extea columns move -p <project-id> --order <id1>,<id2>,<id3> -l <login> -r owner/repo
undefinedextea columns move -p <project-id> --order <id1>,<id2>,<id3> -l <login> -r owner/repo
undefinedJSON Output
JSON 输出
Add / to , , or for machine-readable output.
--output json-o jsonprojects listprojects viewcolumns list在、或命令后添加 / 参数,可获取机器可读的输出结果。
projects listprojects viewcolumns list--output json-o jsonWiki
Wiki
The wiki is a separate git repo at .
http://<host>/{owner}/{repo}.wiki.gitAlways work with the wiki in to avoid polluting the current working directory. Clone it to , edit markdown files, commit, and push.
/tmp/tmp/{repo}-wikibash
undefinedWiki是一个独立的Git仓库,地址为。
http://<host>/{owner}/{repo}.wiki.git请始终在目录下操作Wiki,避免污染当前工作目录。 将其克隆到,编辑markdown文件,提交后推送即可。
/tmp/tmp/{repo}-wikibash
undefinedClone wiki to /tmp (if not already cloned)
Clone wiki to /tmp (if not already cloned)
if [ ! -d /tmp/{repo}-wiki ]; then
git clone "http://user:${TOKEN}@<host>/{owner}/{repo}.wiki.git" /tmp/{repo}-wiki
fi
if [ ! -d /tmp/{repo}-wiki ]; then
git clone "http://user:${TOKEN}@<host>/{owner}/{repo}.wiki.git" /tmp/{repo}-wiki
fi
Pages are markdown files: Home.md, Page-Name.md (use hyphens for spaces)
Pages are markdown files: Home.md, Page-Name.md (use hyphens for spaces)
cd /tmp/{repo}-wiki
git add -A && git commit -m "Update wiki"
git push
Set `user.name` and `user.email` in the wiki repo git config before committing.cd /tmp/{repo}-wiki
git add -A && git commit -m "Update wiki"
git push
提交前请先在Wiki仓库的Git配置中设置`user.name`和`user.email`。Notes
注意事项
- auto-detects the repo from the git remote in
extea, but always pass$PWDexplicitly.-l <login> - When creating repos, do NOT use if you plan to push an existing local repo.
--init - Board commands require a password (stored in config via , or
extea login addenv var). Standard tea commands use API tokens.GITEA_PASSWORD
- 会自动从当前工作目录的Git远程地址中识别仓库,但仍建议显式传入
extea参数。-l <login> - 如果你计划推送已有的本地仓库,创建仓库时请勿使用参数。
--init - 看板相关命令需要密码(可通过存储到配置中,或使用
extea login add环境变量设置)。标准tea命令使用API token即可。GITEA_PASSWORD