Add `tea whoami` command #426
Merged
techknowlogick
merged 5 commits from whoami
into master
10 months ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'whoami'
Deleting a branch is permanent. It CANNOT be undone. Continue?
The User print will be used in future for list of users for admin
var CmdWhoami = cli.Command{
Name: "whoami",
Category: catSetup,
Description: `.`,
That looks odd, please use the same content of
Usage
or elaborate further on the functionality (this string is displayed intea whoami --help
)"github.com/urfave/cli/v2"
)
// CmdTrackedTimes represents the command to operate repositories' times.
linter complains about func comment
case "language":
return x.Language
case "is_admin":
return fmt.Sprintf("%t", x.IsAdmin)
we have a
FormatBool()
helper for consistencynice feature! just some nits :)
Also, will you add a user listing command too? right now
print.UserList()
is dead codeadd whoami cli optionto Add `tea whoami` command 10 months agoyes, I hope to add admin commands to list users (and potentially delete them too, for moderation purposes).
I've updated per your feedback, thanks :)
// Copyright 2020 The Gitea Authors. All rights reserved.
2021
"code.gitea.io/sdk/gitea"
)
// RepoDetails print an repo formatted to stdout
doc func name
), "")
}
// ReposList prints a listing of the repos
same
@axifive I've updated per your feedback, please review :)
case "language":
return x.Language
case "is_admin":
return formatBoolean(x.IsAdmin, true)
updated
@techknowlogick to get CI passing, we need to merge #425 and update this PR (with :magician: powers maybe? ;)
4ffd994549
into master 10 months agoReviewers
4ffd994549
.