mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-29 21:31:02 +00:00
Apply skip ci filter only on push events (#3612)
Fixes: https://github.com/woodpecker-ci/woodpecker/issues/3606
This commit is contained in:
parent
399bc5bf1b
commit
b4cd1da29c
1 changed files with 9 additions and 7 deletions
|
@ -42,6 +42,7 @@ func Create(ctx context.Context, _store store.Store, repo *model.Repo, pipeline
|
||||||
return nil, fmt.Errorf(msg)
|
return nil, fmt.Errorf(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if pipeline.Event == model.EventPush || pipeline.Event == model.EventPull || pipeline.Event == model.EventPullClosed {
|
||||||
skipMatch := skipPipelineRegex.FindString(pipeline.Message)
|
skipMatch := skipPipelineRegex.FindString(pipeline.Message)
|
||||||
if len(skipMatch) > 0 {
|
if len(skipMatch) > 0 {
|
||||||
ref := pipeline.Commit
|
ref := pipeline.Commit
|
||||||
|
@ -51,6 +52,7 @@ func Create(ctx context.Context, _store store.Store, repo *model.Repo, pipeline
|
||||||
log.Debug().Str("repo", repo.FullName).Msgf("ignoring pipeline as skip-ci was found in the commit (%s) message '%s'", ref, pipeline.Message)
|
log.Debug().Str("repo", repo.FullName).Msgf("ignoring pipeline as skip-ci was found in the commit (%s) message '%s'", ref, pipeline.Message)
|
||||||
return nil, ErrFiltered
|
return nil, ErrFiltered
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If the forge has a refresh token, the current access token
|
// If the forge has a refresh token, the current access token
|
||||||
// may be stale. Therefore, we should refresh prior to dispatching
|
// may be stale. Therefore, we should refresh prior to dispatching
|
||||||
|
|
Loading…
Reference in a new issue