mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-27 08:36:37 +00:00
Fix approval requirement if PR is closed (#4902)
This commit is contained in:
parent
64578bff46
commit
4bf5116a52
1 changed files with 2 additions and 2 deletions
|
@ -48,13 +48,13 @@ func needsApproval(repo *model.Repo, pipeline *model.Pipeline) bool {
|
|||
|
||||
// repository requires approval for pull requests from forks
|
||||
case model.RequireApprovalForks:
|
||||
if pipeline.Event == model.EventPull && pipeline.FromFork {
|
||||
if (pipeline.Event == model.EventPull || pipeline.Event == model.EventPullClosed) && pipeline.FromFork {
|
||||
return true
|
||||
}
|
||||
|
||||
// repository requires approval for pull requests
|
||||
case model.RequireApprovalPullRequests:
|
||||
if pipeline.Event == model.EventPull {
|
||||
if pipeline.Event == model.EventPull || pipeline.Event == model.EventPullClosed {
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue