mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-03 16:16:55 +02:00
prevent endless workflow_run trigger
This commit is contained in:
parent
605ed19b9b
commit
c3f6f13377
@ -263,6 +263,15 @@ func skipWorkflows(input *notifyInput, commit *git.Commit) bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if input.Event == webhook_module.HookEventWorkflowRun {
|
||||||
|
wrun, ok := input.Payload.(*api.WorkflowRunPayload)
|
||||||
|
if ok && wrun.WorkflowRun != nil && wrun.WorkflowRun.Event != "workflow_run" {
|
||||||
|
// skip workflow runs triggered by another workflow run
|
||||||
|
// TODO GitHub allows chaining up to 5 of them
|
||||||
|
log.Debug("repo %s: skipped workflow_run because of recursive event", input.Repo.RepoPath())
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user