Step 2 of the Gitea support epic. Stacked on step 1 (the engine's Gitea listers); not merged before 1.1.1 is tagged.
Scope
Accounts
An account names its forge (GitHub, the default, or Gitea) and, for Gitea, the server's address. Both are left out of accounts.json when they are the default, so files written before stay as they are and GitHub accounts written now read the same in an older gclo.
A version of gclo that does not know about forges must not take a Gitea account for a GitHub one and send its token to GitHub. The token of an account that is not on GitHub is therefore kept under a name an older version does not look up: to it, the account has no token.
One place builds the listers for a forge and a server, used by the command line and the app alike.
The default token saved in Settings is a GitHub token. A Gitea account holds its own.
Command line
--forge github|gitea and --server <address> on gclo sync, gclo repos, gclo orgs, and on gclo accounts add and edit; gclo accounts list shows both.
The token of a Gitea run is read from GITEA_TOKEN when no token option is given. GITHUB_TOKEN is never used for a Gitea server, and the other way round.
Exit codes are by the kind of failure, whatever the forge.
docs/CLI.md.
Not in this step
The desktop app's wizard and texts (step 3).
To confirm against a live server before this is merged
Gitea accepts the token as the git password with the fixed user name the git client uses.
Part of #201.
Step 2 of the Gitea support epic. Stacked on step 1 (the engine's Gitea listers); not merged before 1.1.1 is tagged.
## Scope
**Accounts**
- An account names its forge (`GitHub`, the default, or `Gitea`) and, for Gitea, the server's address. Both are left out of `accounts.json` when they are the default, so files written before stay as they are and GitHub accounts written now read the same in an older gclo.
- A version of gclo that does not know about forges must not take a Gitea account for a GitHub one and send its token to GitHub. The token of an account that is not on GitHub is therefore kept under a name an older version does not look up: to it, the account has no token.
- One place builds the listers for a forge and a server, used by the command line and the app alike.
- The default token saved in Settings is a GitHub token. A Gitea account holds its own.
**Command line**
- `--forge github|gitea` and `--server <address>` on `gclo sync`, `gclo repos`, `gclo orgs`, and on `gclo accounts add` and `edit`; `gclo accounts list` shows both.
- The token of a Gitea run is read from `GITEA_TOKEN` when no token option is given. `GITHUB_TOKEN` is never used for a Gitea server, and the other way round.
- Exit codes are by the kind of failure, whatever the forge.
- `docs/CLI.md`.
## Not in this step
The desktop app's wizard and texts (step 3).
## To confirm against a live server before this is merged
Gitea accepts the token as the git password with the fixed user name the git client uses.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #201.
Step 2 of the Gitea support epic. Stacked on step 1 (the engine's Gitea listers); not merged before 1.1.1 is tagged.
Scope
Accounts
GitHub, the default, orGitea) and, for Gitea, the server's address. Both are left out ofaccounts.jsonwhen they are the default, so files written before stay as they are and GitHub accounts written now read the same in an older gclo.Command line
--forge github|giteaand--server <address>ongclo sync,gclo repos,gclo orgs, and ongclo accounts addandedit;gclo accounts listshows both.GITEA_TOKENwhen no token option is given.GITHUB_TOKENis never used for a Gitea server, and the other way round.docs/CLI.md.Not in this step
The desktop app's wizard and texts (step 3).
To confirm against a live server before this is merged
Gitea accepts the token as the git password with the fixed user name the git client uses.