mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
docs: shorten help and migration texts to gh-like brevity
Long texts no longer restate the flag list, the instance selection of tea help environment, the config keys with descriptions or the team argument rules shown under ARGUMENTS; webhook events come from services.WebhookEvents; the migration guide refers to tea help formatting for the terminal layout. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
9 files changed
+31
-101
No files matched your search
+8
-24
@@ -103,7 +103,8 @@ func (a *application) authCommand() *cobra.Command {
|
||||
tea keeps the accounts of each instance in hosts.yml and their tokens in the system
|
||||
keyring, or in a private file when you choose so. One account per instance is active;
|
||||
--user or TEA_USER selects another for a single command. GITEA_TOKEN, together with
|
||||
GITEA_INSTANCE_URL or TEA_HOST, replaces the stored credentials of its instance.`}
|
||||
GITEA_INSTANCE_URL or TEA_HOST, replaces the stored credentials of its instance. See
|
||||
tea help environment for how commands select the instance.`}
|
||||
group.AddCommand(a.loginCommand(), a.logoutCommand(), a.authStatusCommand(), a.authSwitchCommand(), a.authRefreshCommand(), a.authTokenCommand(), a.setupGitCommand(), a.gitCredentialCommand())
|
||||
return group
|
||||
}
|
||||
@@ -124,17 +125,8 @@ func (a *application) loginCommand() *cobra.Command {
|
||||
login := &cobra.Command{
|
||||
Use: "login", Short: "Log in to a Gitea instance", Args: argsExact(0),
|
||||
Annotations: map[string]string{"tea.text": "login does not return a resource", "tea.confirm": "true"},
|
||||
Long: `Log in to a Gitea instance.
|
||||
|
||||
On a terminal without a method flag, tea asks for the instance, how to log in, where to
|
||||
keep the token and whether git should use tea for the instance. Otherwise choose one
|
||||
method:
|
||||
|
||||
--with-token read an access token from stdin, or ask for it on a terminal
|
||||
--oauth, --web authorize tea in a web browser
|
||||
--ssh-key FILE sign requests with an SSH private key
|
||||
--ssh-agent-key FP sign requests with the key of fingerprint FP in ssh-agent
|
||||
--ssh-agent-principal P sign requests with the ssh-agent certificate of principal P
|
||||
Long: `Log in to a Gitea instance. On a terminal without a method flag, tea asks for the instance,
|
||||
how to log in, where to keep the token and whether git should use tea for the instance.
|
||||
|
||||
Create a token on the instance under Settings > Applications. Logging in to an account
|
||||
that tea already has replaces its stored credential after a confirmation (or with --yes).`,
|
||||
@@ -427,11 +419,8 @@ func (a *application) authStatusCommand() *cobra.Command {
|
||||
status := &cobra.Command{
|
||||
Use: "status", Short: "Show the accounts tea can use", Args: argsExact(0),
|
||||
Long: `Show the accounts tea can use on each instance, the active one, and how they
|
||||
authenticate. --verify asks each instance whether the credentials still work.
|
||||
|
||||
A GITEA_TOKEN in the environment shows under its instance, where it replaces the stored
|
||||
accounts. tea auth status fails with exit code 4 when there is no account, or when a
|
||||
credential is missing or rejected.`,
|
||||
authenticate. Fails with exit code 4 when there is no account, or when a credential is
|
||||
missing or rejected.`,
|
||||
Example: `$ tea auth status
|
||||
# Check the credentials against their instances
|
||||
$ tea auth status --verify
|
||||
@@ -637,8 +626,7 @@ func (a *application) authSwitchCommand() *cobra.Command {
|
||||
Annotations: textOutput("switching accounts does not return a resource"), ValidArgsFunction: a.completeAccounts,
|
||||
Long: `Switch the active account of an instance, which commands use unless --user or TEA_USER
|
||||
selects another. With two accounts, tea auth switch toggles between them; with more, it
|
||||
asks which one on a terminal. The instance is the one of the current repository, else
|
||||
--host, TEA_HOST, default_host or the only instance.`,
|
||||
asks which one on a terminal.`,
|
||||
Example: "$ tea auth switch\n$ tea auth switch bob\n$ tea auth switch bob --host gitea.com",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
t, err := a.instanceTarget(cmd.Context())
|
||||
@@ -718,11 +706,7 @@ func (a *application) logoutCommand() *cobra.Command {
|
||||
Annotations: map[string]string{"tea.text": "logout does not return a resource", "tea.confirm": "true"},
|
||||
Long: `Log out of an account: tea forgets the account and deletes its stored credential. Git's
|
||||
other credential helpers are asked to forget what they stored for the account on the
|
||||
instance, such as a copy of its token that a keychain kept after a push.
|
||||
|
||||
Without an account argument or --user, tea logs out of the active account of the
|
||||
current repository's instance, else of --host, TEA_HOST, default_host or the only
|
||||
instance.`,
|
||||
instance, such as a copy of its token that a keychain kept after a push.`,
|
||||
Example: "$ tea auth logout\n$ tea auth logout bob --host gitea.com\n# Without confirmation\n$ tea auth logout alice --yes",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
if len(args) == 1 {
|
||||
|
||||
Reference in new issue
Block a user