added repo repair command
This commit is contained in:
parent
18bee1b84d
commit
48f5eb8057
2 changed files with 25 additions and 0 deletions
|
@ -11,6 +11,7 @@ var repoCmd = cli.Command{
|
|||
repoAddCmd,
|
||||
repoUpdateCmd,
|
||||
repoRemoveCmd,
|
||||
repoRepairCmd,
|
||||
repoChownCmd,
|
||||
},
|
||||
}
|
||||
|
|
24
drone/repo_repair.go
Normal file
24
drone/repo_repair.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
var repoRepairCmd = cli.Command{
|
||||
Name: "repair",
|
||||
Usage: "repair repository webhooks",
|
||||
Action: repoRepair,
|
||||
}
|
||||
|
||||
func repoRepair(c *cli.Context) error {
|
||||
repo := c.Args().First()
|
||||
owner, name, err := parseRepo(repo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
client, err := newClient(c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return client.RepoRepair(owner, name)
|
||||
}
|
Loading…
Reference in a new issue