1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-11-23 21:44:44 +02:00

Refactor pipeline parsing and forge refreshing (#2527)

- refactor pipeline parsing
- do not parse the pipeline multiple times to perform filter checks, do
this once and perform checks on the result directly
    - code deduplication
- refactor forge token refreshing
    - move refreshing to a helper func to reduce code

---------

Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
qwerty287
2023-10-08 14:05:06 +02:00
committed by GitHub
parent 2f4690a6b6
commit 22dfd2ef62
23 changed files with 251 additions and 392 deletions

View File

@@ -25,7 +25,7 @@ import (
"github.com/woodpecker-ci/woodpecker/server/store"
)
// Approve update the status to pending for blocked pipeline because of a gated repo
// Approve update the status to pending for a blocked pipeline because of a gated repo
// and start them afterward
func Approve(ctx context.Context, store store.Store, currentPipeline *model.Pipeline, user *model.User, repo *model.Repo) (*model.Pipeline, error) {
if currentPipeline.Status != model.StatusBlocked {