herrhotzenplotz / gcli

Portable Git(hub|lab|tea) CLI tool
https://herrhotzenplotz.de/gcli/
BSD 2-Clause "Simplified" License
48 stars 2 forks source link

Configuration Account Documentation #134

Closed feraxhp closed 3 days ago

feraxhp commented 2 weeks ago

Hi, sorry I try to configure Gitea, in order to use the tool, but i wasn't able to find any documentation, just for GitHub and Bugzilla. It will also be nice to see how to configure GitLab.

herrhotzenplotz commented 2 weeks ago

Hey! Thanks for reporting this!

I guess you were reading the tutorial.

There is some documentation in the gcli(5) manual page regarding Gitea and Gitlab however this situation can be dramatically improved.

For now here's what you need to do for these two undocumented forges:

Gitlab

defaults {
    ...
    gitlab-default-account=gitlab-com
}

gitlab-com {
    account=<the-user-name-at-the-forge>
    token=<the-token-you-just-created>
    apibase=https://gitlab.com/api/v4
    forge-type=gitlab
}

Now when you run gcli -t gitlab issues -o herrhotzenplotz -r gcli you should get a list of issues.

Gitea

The steps are roughly the same here as with Gitlab.

NOTE: This might be broken for either Forgejo (which is a fork of Gitea) or vice versa.

defaults {
    ...
    gitea-default-account=codeberg-org
}

codeberg-org {
    account=<the-user-name-at-the-forge>
    token=<the-token-you-just-created>
    apibase=https://codeberg.org/api/v1
    forge-type=gitea
}

This stuff needs to go into at least the tutorial and maybe also the manual pages. If you want to have a go at this, please feel free and submit your patches or report back!

gbowne1 commented 2 weeks ago

Yeah I too was wondering where the gitea and codeberg docs were :-)