mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-19 11:24:06 +00:00
Add godot linter to harmonitze toplevel comments (#3650)
This commit is contained in:
@@ -27,7 +27,7 @@ import (
|
||||
)
|
||||
|
||||
// Approve update the status to pending for a blocked pipeline because of a gated repo
|
||||
// and start them afterward
|
||||
// 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 {
|
||||
return nil, ErrBadRequest{Msg: fmt.Sprintf("cannot approve a pipeline with status %s", currentPipeline.Status)}
|
||||
|
@@ -32,7 +32,7 @@ import (
|
||||
|
||||
var skipPipelineRegex = regexp.MustCompile(`\[(?i:ci *skip|skip *ci)\]`)
|
||||
|
||||
// Create a new pipeline and start it
|
||||
// Create a new pipeline and start it.
|
||||
func Create(ctx context.Context, _store store.Store, repo *model.Repo, pipeline *model.Pipeline) (*model.Pipeline, error) {
|
||||
repoUser, err := _store.GetUser(repo.UserID)
|
||||
if err != nil {
|
||||
|
@@ -25,7 +25,7 @@ import (
|
||||
"go.woodpecker-ci.org/woodpecker/v2/server/store"
|
||||
)
|
||||
|
||||
// Decline updates the status to declined for blocked pipelines because of a gated repo
|
||||
// Decline updates the status to declined for blocked pipelines because of a gated repo.
|
||||
func Decline(ctx context.Context, store store.Store, pipeline *model.Pipeline, user *model.User, repo *model.Repo) (*model.Pipeline, error) {
|
||||
forge, err := server.Config.Services.Manager.ForgeFromRepo(repo)
|
||||
if err != nil {
|
||||
|
@@ -117,7 +117,7 @@ func createPipelineItems(c context.Context, forge forge.Forge, store store.Store
|
||||
|
||||
// setPipelineStepsOnPipeline is the link between pipeline representation in "pipeline package" and server
|
||||
// to be specific this func currently is used to convert the pipeline.Item list (crafted by StepBuilder.Build()) into
|
||||
// a pipeline that can be stored in the database by the server
|
||||
// a pipeline that can be stored in the database by the server.
|
||||
func setPipelineStepsOnPipeline(pipeline *model.Pipeline, pipelineItems []*stepbuilder.Item) *model.Pipeline {
|
||||
var pidSequence int
|
||||
for _, item := range pipelineItems {
|
||||
|
@@ -27,7 +27,7 @@ import (
|
||||
"go.woodpecker-ci.org/woodpecker/v2/server/store"
|
||||
)
|
||||
|
||||
// Restart a pipeline by creating a new one out of the old and start it
|
||||
// Restart a pipeline by creating a new one out of the old and start it.
|
||||
func Restart(ctx context.Context, store store.Store, lastPipeline *model.Pipeline, user *model.User, repo *model.Repo, envs map[string]string) (*model.Pipeline, error) {
|
||||
forge, err := server.Config.Services.Manager.ForgeFromRepo(repo)
|
||||
if err != nil {
|
||||
|
@@ -25,7 +25,7 @@ import (
|
||||
"go.woodpecker-ci.org/woodpecker/v2/server/store"
|
||||
)
|
||||
|
||||
// start a pipeline, make sure it was stored persistent in the store before
|
||||
// start a pipeline, make sure it was stored persistent in the store before.
|
||||
func start(ctx context.Context, forge forge.Forge, store store.Store, activePipeline *model.Pipeline, user *model.User, repo *model.Repo, pipelineItems []*stepbuilder.Item) (*model.Pipeline, error) {
|
||||
// call to cancel previous pipelines if needed
|
||||
if err := cancelPreviousPipelines(ctx, forge, store, activePipeline, repo, user); err != nil {
|
||||
|
@@ -38,7 +38,7 @@ import (
|
||||
"go.woodpecker-ci.org/woodpecker/v2/server/model"
|
||||
)
|
||||
|
||||
// StepBuilder Takes the hook data and the yaml and returns in internal data model
|
||||
// StepBuilder Takes the hook data and the yaml and returns in internal data model.
|
||||
type StepBuilder struct {
|
||||
Repo *model.Repo
|
||||
Curr *model.Pipeline
|
||||
|
@@ -25,7 +25,7 @@ import (
|
||||
"go.woodpecker-ci.org/woodpecker/v2/server/pubsub"
|
||||
)
|
||||
|
||||
// publishToTopic publishes message to UI clients
|
||||
// publishToTopic publishes message to UI clients.
|
||||
func publishToTopic(pipeline *model.Pipeline, repo *model.Repo) {
|
||||
message := pubsub.Message{
|
||||
Labels: map[string]string{
|
||||
|
Reference in New Issue
Block a user