improve branch filter logic for non-push hooks
this change alters the branch filter logic to not execute for tags or deployment hooks, which may contain the ref in the branch field and would otherwise be likely to fail the check.
This commit is contained in:
parent
c613571bd6
commit
fd80216b74
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ func PostHook(c *gin.Context) {
|
|||
|
||||
// verify the branches can be built vs skipped
|
||||
branches := yaml.ParseBranch(raw)
|
||||
if !branches.Matches(build.Branch) {
|
||||
if !branches.Matches(build.Branch) && build.Event != model.EventTag && build.Event != model.EventDeploy {
|
||||
c.String(200, "Branch does not match restrictions defined in yaml")
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue