mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-08-31 21:09:54 +00:00
Fix broken gated repos (#2959)
Fixes a bug introduced in https://github.com/woodpecker-ci/woodpecker/pull/2923. I'll also try to add a test case.
This commit is contained in:
@@ -87,10 +87,6 @@ func Create(ctx context.Context, _store store.Store, repo *model.Repo, pipeline
|
||||
return nil, ErrFiltered
|
||||
}
|
||||
|
||||
if err := updatePipelinePending(ctx, _store, pipeline, repo, repoUser); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pipeline = setPipelineStepsOnPipeline(pipeline, pipelineItems)
|
||||
|
||||
// persist the pipeline config for historical correctness, restarts, etc
|
||||
@@ -116,6 +112,10 @@ func Create(ctx context.Context, _store store.Store, repo *model.Repo, pipeline
|
||||
return pipeline, nil
|
||||
}
|
||||
|
||||
if err := updatePipelinePending(ctx, _store, pipeline, repo, repoUser); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pipeline, err = start(ctx, _store, pipeline, repoUser, repo, pipelineItems)
|
||||
if err != nil {
|
||||
msg := fmt.Sprintf("failed to start pipeline for %s", repo.FullName)
|
||||
|
Reference in New Issue
Block a user