Use Github/Gogs Api To Create Repo
Table of Contents
Gogs implemented Github api. The only different is the URL.
No matter you are using Gogs or Github, you have to login your account and generate a token.
Go into Settings -> Applications, then click Generate New Token.
Go into Settings -> Developer settings -> Personal access tokens, then click Generate new token.
In both cases, copy&paste the token into a file right away. We will need it in our script/function below.
The only difference between gogs and github is the
URL. Gogs need
/api/v1 in its url, while github uses
api sub-domain. Uncomment the one you want to use.
Add function in
.zshrc and use as follow: