Support --sudo #480
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#480
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
add flag for admins to exec things for other users
There's two ways to go about this:
add this flag to most subcommands. example:
tea pr merge --sudo=6543 480
have a new subcommand
tea sudo
, that inherits most other tea commands as subcommands and adds the--sudo
flag like this:tea sudo --sudo=6543 pr merge 480
.Option (1) has slightly higher maintenance effort, as the flag needs to be manually added to all (new) subcommands.
Option (2) is low effort to implement (see noerw/tea:sudo branch), but because urfave/cli has strict argument/flag ordering, is a bit fiddly to use (--sudo must go before the subcommand).
go with 2 ... "les maintinance cost" did catched me ;)
I like 1 because it will not introduce a new command. For users, it's easy to remember.
cli v3 does sollfe the mentioned issue ... so we can have global flags that will be able to be added at the end