ignore skip directive for promote and rollback events
This commit is contained in:
parent
a3863f9395
commit
e3f09c867d
2 changed files with 24 additions and 0 deletions
|
@ -61,6 +61,10 @@ func skipMessage(hook *core.Hook) bool {
|
|||
return false
|
||||
case hook.Event == core.EventCustom:
|
||||
return false
|
||||
case hook.Event == core.EventPromote:
|
||||
return false
|
||||
case hook.Event == core.EventRollback:
|
||||
return false
|
||||
case skipMessageEval(hook.Message):
|
||||
return true
|
||||
case skipMessageEval(hook.Title):
|
||||
|
|
|
@ -200,6 +200,26 @@ func Test_skipMessage(t *testing.T) {
|
|||
title: "update readme [CI SKIP]",
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
event: "promote",
|
||||
title: "update readme [CI SKIP]",
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
event: "promote",
|
||||
title: "update readme [CI SKIP]",
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
event: "rollback",
|
||||
title: "update readme [CI SKIP]",
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
event: "rollback",
|
||||
title: "update readme [CI SKIP]",
|
||||
want: false,
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
hook := &core.Hook{
|
||||
|
|
Loading…
Reference in a new issue