aboutsummaryrefslogtreecommitdiffstats
path: root/services/issue/comments.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/issue/comments.go')
-rw-r--r--services/issue/comments.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/issue/comments.go b/services/issue/comments.go
index 46f92f7cd2..10c81198d5 100644
--- a/services/issue/comments.go
+++ b/services/issue/comments.go
@@ -5,6 +5,7 @@ package issue
import (
"context"
+ "errors"
"fmt"
"code.gitea.io/gitea/models/db"
@@ -22,7 +23,7 @@ import (
// CreateRefComment creates a commit reference comment to issue.
func CreateRefComment(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, issue *issues_model.Issue, content, commitSHA string) error {
if len(commitSHA) == 0 {
- return fmt.Errorf("cannot create reference with empty commit SHA")
+ return errors.New("cannot create reference with empty commit SHA")
}
if user_model.IsUserBlockedBy(ctx, doer, issue.PosterID, repo.OwnerID) {