Add tea whoami
command #426
Labels
No Label
kind/breaking
kind/bug
kind/build
kind/dependency
kind/deployment
kind/docs
kind
enhancement
kind
feature
kind/proposal
kind
question
kind
refactor
kind/security
kind/testing
kind/translation
priority/critical
priority/high
priority/low
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/has-backport
status/has-pull
status/needs-backport
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
upstream/sdk
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/tea#426
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "whoami"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The User print will be used in future for list of users for admin
@ -0,0 +15,4 @@
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
)@ -0,0 +11,4 @@
"github.com/urfave/cli/v2"
)
// CmdTrackedTimes represents the command to operate repositories' times.
linter complains about func comment
@ -0,0 +108,4 @@
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` commandyes, I hope to add admin commands to list users (and potentially delete them too, for moderation purposes).
I've updated per your feedback, thanks :)
@ -0,0 +1,126 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
2021
@ -0,0 +10,4 @@
"code.gitea.io/sdk/gitea"
)
// RepoDetails print an repo formatted to stdout
doc func name
@ -0,0 +52,4 @@
), "")
}
// ReposList prints a listing of the repos
same
@axifive I've updated per your feedback, please review :)
@ -0,0 +108,4 @@
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? ;)