mirror of
https://gitea.com/gitea/tea.git
synced 2026-09-10 07:26:33 -04:00
Add deploy-tokens to CHANGELOG and README, fix lint comments
This commit is contained in:
parent
dfb08abe2a
commit
e5dfe86193
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
* FEATURES
|
||||
* Add `tea deploy-keys` command for listing, creating, and deleting repository deploy keys (`tea deploy-keys list`, `tea deploy-keys create <title> --key-file <path>`, `tea deploy-keys delete <id>`)
|
||||
* Add `tea deploy-tokens` command for listing, creating, and deleting repository deploy tokens (`tea deploy-tokens list`, `tea deploy-tokens create <title>`, `tea deploy-tokens delete <id>`)
|
||||
|
||||
## [v0.13.0](https://gitea.com/gitea/tea/releases/tag/v0.13.0) - 2026-04-05
|
||||
|
||||
|
|
|
|||
|
|
@ -90,6 +90,9 @@ EXAMPLES
|
|||
tea deploy-keys list # list repository deploy keys
|
||||
tea deploy-keys create CI --key-file ~/.ssh/id_ed25519.pub --read-write
|
||||
tea deploy-keys delete 7 -y # remove a deploy key without prompting
|
||||
tea deploy-tokens list # list repository deploy tokens
|
||||
tea deploy-tokens create CI # create a deploy token
|
||||
tea deploy-tokens delete 7 -y # remove a deploy token without prompting
|
||||
|
||||
# send gitea desktop notifications every 5 minutes (bash + libnotify)
|
||||
while :; do tea notifications --mine -o simple | xargs -i notify-send {}; sleep 300; done
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import (
|
|||
"github.com/urfave/cli/v3"
|
||||
)
|
||||
|
||||
// CmdDeployTokensCreate is the command to create a deploy token
|
||||
var CmdDeployTokensCreate = cli.Command{
|
||||
Name: "create",
|
||||
Aliases: []string{"add", "c"},
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/urfave/cli/v3"
|
||||
)
|
||||
|
||||
// CmdDeployTokensDelete is the command to delete a deploy token
|
||||
var CmdDeployTokensDelete = cli.Command{
|
||||
Name: "delete",
|
||||
Aliases: []string{"rm"},
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/urfave/cli/v3"
|
||||
)
|
||||
|
||||
// CmdDeployTokensList is the command to list deploy tokens
|
||||
var CmdDeployTokensList = cli.Command{
|
||||
Name: "list",
|
||||
Aliases: []string{"ls"},
|
||||
|
|
@ -26,6 +27,7 @@ var CmdDeployTokensList = cli.Command{
|
|||
}, flags.AllDefaultFlags...),
|
||||
}
|
||||
|
||||
// RunDeployTokensList lists deploy tokens
|
||||
func RunDeployTokensList(ctx stdctx.Context, cmd *cli.Command) error {
|
||||
c, err := context.InitCommand(cmd)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import (
|
|||
"gitea.dev/sdk"
|
||||
)
|
||||
|
||||
// DeployTokensList prints a list of deploy tokens
|
||||
func DeployTokensList(keys []*gitea.DeployKey, output string) {
|
||||
t := tableWithHeader(
|
||||
"ID",
|
||||
|
|
@ -39,6 +40,7 @@ func DeployTokensList(keys []*gitea.DeployKey, output string) {
|
|||
t.print(output)
|
||||
}
|
||||
|
||||
// DeployTokenDetails prints details of a single deploy token
|
||||
func DeployTokenDetails(key *gitea.DeployKey) {
|
||||
fmt.Printf("# Deploy Token %d\n\n", key.ID)
|
||||
fmt.Printf("- **Title**: %s\n", key.Title)
|
||||
|
|
|
|||
Loading…
Reference in a new issue