diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/actions/task.go | 2 | ||||
-rw-r--r-- | models/activities/action.go | 3 | ||||
-rw-r--r-- | models/issues/review.go | 3 |
3 files changed, 3 insertions, 5 deletions
diff --git a/models/actions/task.go b/models/actions/task.go index 69f52cf084..db0031b3b8 100644 --- a/models/actions/task.go +++ b/models/actions/task.go @@ -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() } diff --git a/models/activities/action.go b/models/activities/action.go index 1bfd62438b..15bd9a52ac 100644 --- a/models/activities/action.go +++ b/models/activities/action.go @@ -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). diff --git a/models/issues/review.go b/models/issues/review.go index 8b64ba8048..1cb5379b2f 100644 --- a/models/issues/review.go +++ b/models/issues/review.go @@ -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. |