@@ -24,10 +24,10 @@ package cmd
2424
2525import (
2626 "fmt"
27- "path"
2827 "sync"
2928
30- "github.com/J-Siu/go-gitapi/v2/gitapi"
29+ "github.com/J-Siu/go-gitapi/v3/api"
30+ "github.com/J-Siu/go-gitapi/v3/base"
3131 "github.com/J-Siu/go-mygit/v2/global"
3232 "github.com/J-Siu/go-mygit/v2/lib"
3333 "github.com/spf13/cobra"
@@ -41,7 +41,7 @@ var repoDelSecretCmd = &cobra.Command{
4141 Long : "Delete action secret. If --name is not set, all secrets in config will be used. " + global .TXT_REPO_DIR_LONG ,
4242 Run : func (cmd * cobra.Command , args []string ) {
4343 var (
44- out = make (chan * gitapi. GitApi , 10 )
44+ out = make (chan api. IApi , 10 )
4545 wg sync.WaitGroup
4646 )
4747 // If no repo specified in command line, add a ""
@@ -57,15 +57,15 @@ var repoDelSecretCmd = &cobra.Command{
5757 go func () {
5858 for _ , workPath := range args {
5959 for _ , remote := range global .Conf .MergedRemotes {
60- if remote .Vendor != gitapi .VendorGithub {
60+ if remote .Vendor != base .VendorGithub {
6161 fmt .Printf ("%s(%s) action secret not supported.\n " , remote .Name , remote .Vendor )
6262 } else {
6363 for _ , secret := range global .Flag .SecretsDel {
64- var gitApi * gitapi. GitApi = remote . GetGitApi ( & workPath , nil , global . Flag . Debug )
65- gitApi . EndpointReposSecrets ( )
66- gitApi . Req . Endpoint = path . Join ( gitApi . Req . Endpoint , secret )
67- gitApi . SetDel ( )
68- lib .RepoDoRun (gitApi , global .Flag .NoParallel , & wg , out )
64+ var (
65+ property = remote . GitApiProperty ( & workPath , global . Flag . Debug )
66+ ga = new (api. Repo ). New ( property ). DelSecret ( secret )
67+ )
68+ lib .RepoDoRun (ga , global .Flag .NoParallel , & wg , out )
6969 }
7070 }
7171 }
0 commit comments