mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 15:53:59 +00:00
Rename remote to forge (#1357)
As of #745 Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
@@ -24,8 +24,8 @@ import (
|
||||
|
||||
"github.com/woodpecker-ci/woodpecker/pipeline/frontend/yaml"
|
||||
"github.com/woodpecker-ci/woodpecker/server"
|
||||
"github.com/woodpecker-ci/woodpecker/server/forge"
|
||||
"github.com/woodpecker-ci/woodpecker/server/model"
|
||||
"github.com/woodpecker-ci/woodpecker/server/remote"
|
||||
"github.com/woodpecker-ci/woodpecker/server/shared"
|
||||
"github.com/woodpecker-ci/woodpecker/server/store"
|
||||
)
|
||||
@@ -38,7 +38,7 @@ func Restart(ctx context.Context, store store.Store, lastBuild *model.Pipeline,
|
||||
return nil, ErrBadRequest{Msg: fmt.Sprintf("cannot restart a pipeline with status %s", lastBuild.Status)}
|
||||
}
|
||||
|
||||
var pipelineFiles []*remote.FileMeta
|
||||
var pipelineFiles []*forge.FileMeta
|
||||
|
||||
// fetch the old pipeline config from database
|
||||
configs, err := store.ConfigsForPipeline(lastBuild.ID)
|
||||
@@ -49,14 +49,14 @@ func Restart(ctx context.Context, store store.Store, lastBuild *model.Pipeline,
|
||||
}
|
||||
|
||||
for _, y := range configs {
|
||||
pipelineFiles = append(pipelineFiles, &remote.FileMeta{Data: y.Data, Name: y.Name})
|
||||
pipelineFiles = append(pipelineFiles, &forge.FileMeta{Data: y.Data, Name: y.Name})
|
||||
}
|
||||
|
||||
// If config extension is active we should refetch the config in case something changed
|
||||
if server.Config.Services.ConfigService != nil && server.Config.Services.ConfigService.IsConfigured() {
|
||||
currentFileMeta := make([]*remote.FileMeta, len(configs))
|
||||
currentFileMeta := make([]*forge.FileMeta, len(configs))
|
||||
for i, cfg := range configs {
|
||||
currentFileMeta[i] = &remote.FileMeta{Name: cfg.Name, Data: cfg.Data}
|
||||
currentFileMeta[i] = &forge.FileMeta{Name: cfg.Name, Data: cfg.Data}
|
||||
}
|
||||
|
||||
newConfig, useOld, err := server.Config.Services.ConfigService.FetchConfig(ctx, repo, lastBuild, currentFileMeta)
|
||||
|
||||
Reference in New Issue
Block a user