Skip to content

Commit

Permalink
Fix broken gated repos (#2959)
Browse files Browse the repository at this point in the history
Fixes a bug introduced in
#2923. I'll also try to
add a test case.
  • Loading branch information
xoxys authored Dec 17, 2023
1 parent b66f6cb commit 23f58fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/pipeline/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 23f58fc

Please sign in to comment.