Usage
1. Setting Up the Gitee Access Token
Create a Gitee personal access token with user_info, projects, pull_requests, and issues permissions, then configure the token.
bash
oegitext config -token ${access_token}2. Showing Repository Information
View command help:
bash
oegitext show proj -hCommand syntax:
text
oegitext show proj [OPTIONS]
Available options:
-h/--help Show this help.
-create Show projects created by me.
-p/--pretty Formatted output
-j/--json JSON output
-s/--sort Sort by: created/updated
-d/--direction Sort order: asc/desc
-c/--columns Select output columns.Listing Accessible Projects
bash
oegitext show proj
oegitext show proj -p # Formatted output
oegitext show proj -c state,url # Filter specific columns.
oegitext show proj -c state,url -pListing Projects Created by Me
bash
oegitext show proj -create # Formatted output
oegitext show proj -create -p # Show only the state and url columns.
oegitext show proj -create -c state,url3. Showing Issue Information
bash
oegitext show issue -htext
oegitext show issue [-h] [-create] [-p] [-j] [-s {created,updated}] [-d {desc,asc}] [-c COLUMNS]
Available options:
-h, --help Show this help.
-create Show issues created by me.
-p, --pretty Formatted output
-j, --json JSON output
-s, --sort Sort by: created/updated
-d, --direction Sort order: asc/desc
-c, --columns Select output columns.Listing Issues Assigned to Me
bash
oegitext show issue # Formatted output
oegitext show issue -p # Show only the state and url columns.
oegitext show issue -c state,urlListing Issues Created by Me
bash
oegitext show issue -create # Formatted output
oegitext show issue -create -p # Show only the state and url columns.
oegitext show issue -create -c state,url4. Showing PR Information
bash
oegitext show pr -htext
oegitext show pr [-h] [-oe] -name REPO_NAME [-only] [-p] [-j] [-c COLUMNS]
Available options:
-h, --help Show this help.
-name PR location (owner/repo)
-only Show PRs created by me.
-p, --pretty Formatted output
-j, --json JSON output
-c, --columns Select output columns.Listing PRs of a Repository
bash
oegitext show pr -name src-openeuler/vscode # Formatted output
oegitext show pr -name src-openeuler/vscode -p # Show only the state and url columns.
oegitext show pr -name src-openeuler/vscode -c state,url5. Showing openEuler Repository Information
bash
oegitext show repo -htext
oegitext show repo [-h] [-owner {openeuler,src-openeuler}] [-p] [-j] [-c COLUMNS]
Available options:
-h, --help Show this help.
-owner Repository owner (openeuler or src-openeuler, defaulting to openeuler)
-p, --pretty Formatted output
-j, --json JSON output
-c, --columns Select output columns.6. Forking a Repository
bash
oegitext show fork -htext
oegitext fork [-h] -user USER -repo REPO [-org ORG] [-name NAME] [-path PATH] [-show]
Available options:
-h, --help Show this help.
-user USER Namespace path (organization/enterprise/personal path)
-repo REPO Repository path
-org ORG Full organization namespace path (default: forks to personal namespace)
-name NAME Forked repository name (default: same as source)
-path PATH Forked repository path (default: same as source)
-show Display request result.7. Handling Issues
bash
oegitext show issue -htext
oegitext issue [-h] -cmd {create,update,close,open,get} [-user USER] [-repo REPO] [-title TITLE] [-number NUMBER]
[-body BODY] [-show]
Available options:
-h, --help Show this help.
-cmd Issue operation command
-user USER Issue namespace path (organization/enterprise/personal path)
-repo REPO Repository path
-title TITLE Issue title
-number NUMBER Issue number
-body BODY Issue content
-show Display request result.Getting Repository Issues
text
oegitext issue -cmd get -user USER -repo REPO -number NUMBER [-show]Creating an Issue
text
oegitext issue -cmd create -user USER -repo REPO -title TITLE [-body BODY] [-show]Updating an Issue
text
oegitext issue -cmd update -user USER -repo REPO -title TITLE -number NUMBER [-body BODY] [-show]Closing an Issue
text
oegitext issue -cmd close -user USER -repo REPO -number NUMBER [-show]Reopening an Issue
text
oegitext issue -cmd open -user USER -repo REPO -number NUMBER [-show]8. Handling PRs
bash
oegitext pull -htext
oegitext pull [-h] -cmd {create,update,close,open,review,test,merge,get} [-user USER] [-repo REPO] [-title TITLE]
[-head HEAD] [-base BASE] [-number NUMBER] [-body BODY] [-state STATE] [-show]
Available options:
-h, --help Show this help.
-cmd PR operation command: create, update, close, open, review, test, merge, get
-user USER PR namespace path (organization/enterprise/personal path)
-repo REPO Repository path
-title TITLE PR title
-head HEAD Source branch (format: branch or path_with_namespace:branch)
-base BASE Target branch name
-number NUMBER PR number
-body PR content
-state STATE PR state
-show Display request result.Getting PR Information
text
oegitext pull -cmd get -user USER -repo REPO -number NUMBER [-show]Creating a PR
text
oegitext pull -cmd create -user USER -repo REPO -title TITLE -head HEAD -base BASE [-body BODY] [-show]
Available options:
-head HEAD: Pull Request 提交的源分支。格式:branch (master) 或者:path_with_namespace:branch (oschina/gitee:master)
-base BASE: Pull Request 提交目标分支的名称Updating a PR
text
oegitext pull -cmd update -user USER -repo REPO -number NUMBER -body BODY [-show]Closing a PR
text
oegitext pull -cmd close -user USER -repo REPO -number NUMBER [-show]Reopening a PR
text
oegitext pull -cmd open -user USER -repo REPO -number NUMBER [-show]Reviewing a PR
text
oegitext pull -cmd review -user USER -repo REPO -number NUMBER -state {pass,reset} [-show]
Available options:
-state pass: Force review approval.
reset: Reset review status.Testing a PR
text
oegitext pull -cmd test -user USER -repo REPO -number NUMBER -state {pass,reset} [-show]
Available options:
-state pass: Force test approval.
reset: Reset test status.Merging a PR
text
oegitext pull -cmd merge -user USER -repo REPO -number NUMBER [-show]Bug