mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-10 17:45:36 +00:00
gofmt
This commit is contained in:
parent
82189c27fe
commit
3141ccdaae
2 changed files with 10 additions and 10 deletions
|
@ -132,12 +132,12 @@ func (c *Client) FindFileForRepo(owner string, repo string, fileName string, ref
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) CreateHook(owner string, name string, callBackLink string) error {
|
func (c *Client) CreateHook(owner string, name string, callBackLink string) error {
|
||||||
hookDetails , err := c.GetHookDetails(owner, name)
|
hookDetails, err := c.GetHookDetails(owner, name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
hooks := make([]string, 0)
|
hooks := make([]string, 0)
|
||||||
if (hookDetails.Enabled) {
|
if hookDetails.Enabled {
|
||||||
hookSettings, err := c.GetHooks(owner, name)
|
hookSettings, err := c.GetHooks(owner, name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -172,14 +172,14 @@ type RefChange struct {
|
||||||
|
|
||||||
type HookPluginDetails struct {
|
type HookPluginDetails struct {
|
||||||
Details struct {
|
Details struct {
|
||||||
Key string `json:"key"`
|
Key string `json:"key"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
Version string `json:"version"`
|
Version string `json:"version"`
|
||||||
ConfigFormKey string `json:"configFormKey"`
|
ConfigFormKey string `json:"configFormKey"`
|
||||||
} `json:"details"`
|
} `json:"details"`
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled"`
|
||||||
Configured bool `json:"configured"`
|
Configured bool `json:"configured"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue