Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ XGO_VERSION := go-1.21.x
AIR_PACKAGE ?= github.com/cosmtrek/[email protected]
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/[email protected]
GOFUMPT_PACKAGE ?= mvdan.cc/[email protected]
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.1
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.0
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/[email protected]
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion models/actions/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func CreateTaskForRunner(ctx context.Context, runner *ActionRunner) (*ActionTask
return nil, false, fmt.Errorf("parse workflow of job %d: %w", job.ID, err)
} else if len(gots) != 1 {
return nil, false, fmt.Errorf("workflow of job %d: not single workflow", job.ID)
} else {
} else { //nolint:revive
_, workflowJob = gots[0].Job()
}

Expand Down
3 changes: 1 addition & 2 deletions models/activities/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -713,9 +713,8 @@ func DeleteIssueActions(ctx context.Context, repoID, issueID, issueIndex int64)
break
} else if _, err = db.GetEngine(ctx).In("comment_id", commentIDs).Delete(&Action{}); err != nil {
return err
} else {
lastCommentID = commentIDs[len(commentIDs)-1]
}
lastCommentID = commentIDs[len(commentIDs)-1]
}

_, err := e.Where("repo_id = ?", repoID).
Expand Down
3 changes: 1 addition & 2 deletions models/issues/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,8 @@ func GetReviewByID(ctx context.Context, id int64) (*Review, error) {
return nil, err
} else if !has {
return nil, ErrReviewNotExist{ID: id}
} else {
return review, nil
}
return review, nil
}

// CreateReviewOptions represent the options to create a review. Type, Issue and Reviewer are required.
Expand Down
7 changes: 3 additions & 4 deletions modules/activitypub/user_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ func GetKeyPair(ctx context.Context, user *user_model.User) (pub, priv string, e
return pub, priv, err
}
return pub, priv, err
} else {
priv = settings[user_model.UserActivityPubPrivPem].SettingValue
pub = settings[user_model.UserActivityPubPubPem].SettingValue
return pub, priv, err
}
priv = settings[user_model.UserActivityPubPrivPem].SettingValue
pub = settings[user_model.UserActivityPubPubPem].SettingValue
return pub, priv, err
}

// GetPublicKey function returns a user's public key
Expand Down
3 changes: 1 addition & 2 deletions modules/git/submodule.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,8 @@ func getRefURL(refURL, urlPrefix, repoFullName, sshDomain string) string {
return ref.Scheme + "://" + ref.Host + ref.Path
} else if urlPrefixHostname == refHostname || refHostname == sshDomain {
return urlPrefix + path.Clean(path.Join("/", ref.Path))
} else {
return "http://" + refHostname + ref.Path
}
return "http://" + refHostname + ref.Path
}
}

Expand Down
5 changes: 2 additions & 3 deletions modules/lfs/transferadapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,9 @@ func TestBasicTransferAdapter(t *testing.T) {
json.NewEncoder(payload).Encode(er)

return &http.Response{StatusCode: http.StatusNotFound, Body: io.NopCloser(payload)}
} else {
t.Errorf("Unknown test case: %s", url)
return nil
}
t.Errorf("Unknown test case: %s", url)
return nil
}

hc := &http.Client{Transport: RoundTripFunc(roundTripHandler)}
Expand Down
Loading