mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 03:41:01 +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:
parent
b66f6cb118
commit
23f58fc07a
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue