Skip to content

Commit

Permalink
fix pls
Browse files Browse the repository at this point in the history
  • Loading branch information
Claire.Nicholas authored and Claire.Nicholas committed Dec 22, 2023
1 parent 13d051b commit 43cc0fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/build/restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,6 @@ func RestartBuild(c *gin.Context) {
}

// check if the pipeline did not already exist in the database
//
//nolint:dupl // ignore duplicate code
if pipeline == nil {
pipeline = compiled
pipeline.SetRepoID(r.GetID())
Expand Down Expand Up @@ -342,6 +340,9 @@ func RestartBuild(c *gin.Context) {
c.JSON(http.StatusCreated, b)

d, _ := database.FromContext(c).GetDeploymentForRepo(c, r, b.GetDeployNumber())
if err != nil {

Check failure on line 343 in api/build/restart.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] api/build/restart.go#L343

if statements should only be cuddled with assignments used in the if statement itself (wsl)
Raw output
api/build/restart.go:343:2: if statements should only be cuddled with assignments used in the if statement itself (wsl)
	if err != nil {
	^
logger.Errorf("unable to set get deployment for build %s: %v", entry, err)
}

build := append(d.Builds, b)

Expand Down

0 comments on commit 43cc0fc

Please sign in to comment.