mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 08:56:29 +00:00
upgrade go1.3 and irc library
This commit is contained in:
parent
5eb0aab517
commit
3493b868ef
3 changed files with 8 additions and 7 deletions
|
@ -17,18 +17,18 @@ type IRC struct {
|
|||
Channel string `yaml:"channel,omitempty"`
|
||||
Nick string `yaml:"nick,omitempty"`
|
||||
Server string `yaml:"server,omitempty"`
|
||||
Started bool `yaml:"on_started,omitempty"`
|
||||
Success bool `yaml:"on_success,omitempty"`
|
||||
Failure bool `yaml:"on_failure,omitempty"`
|
||||
Started *bool `yaml:"on_started,omitempty"`
|
||||
Success *bool `yaml:"on_success,omitempty"`
|
||||
Failure *bool `yaml:"on_failure,omitempty"`
|
||||
}
|
||||
|
||||
func (i *IRC) Send(req *model.Request) error {
|
||||
switch {
|
||||
case req.Commit.Status == "Started" && i.Started:
|
||||
case req.Commit.Status == "Started" && i.Started != nil && *i.Started == true:
|
||||
return i.sendStarted(req)
|
||||
case req.Commit.Status == "Success" && i.Success:
|
||||
case req.Commit.Status == "Success" && i.Success != nil && *i.Success == true:
|
||||
return i.sendSuccess(req)
|
||||
case req.Commit.Status == "Failure" && i.Failure:
|
||||
case req.Commit.Status == "Failure" && i.Failure != nil && *i.Failure == true:
|
||||
return i.sendFailure(req)
|
||||
}
|
||||
return nil
|
||||
|
|
|
@ -197,6 +197,7 @@ var builders = map[string]*image{
|
|||
"go1": {Tag: "bradrydzewski/go:1.0"},
|
||||
"go1.1": {Tag: "bradrydzewski/go:1.1"},
|
||||
"go1.2": {Tag: "bradrydzewski/go:1.2"},
|
||||
"go1.3": {Tag: "bradrydzewski/go:1.3"},
|
||||
|
||||
// Haskell build images
|
||||
"haskell": {Tag: "bradrydzewski/haskell:7.4"},
|
||||
|
|
Loading…
Reference in a new issue