Skip to content

Commit b53d1a0

Browse files
lunnyKN4CK3R
andauthored
Apply suggestions from code review
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
1 parent ea5ad22 commit b53d1a0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

models/issues/milestone.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func NewMilestone(m *Milestone) (err error) {
124124
return committer.Commit()
125125
}
126126

127-
// HasMilestoneByRepoID returns if the milestone exists in the repository.
127+
// HasMilestoneByRepoID returns if the milestone exists in the repository.
128128
func HasMilestoneByRepoID(ctx context.Context, repoID, id int64) (bool, error) {
129129
return db.GetEngine(ctx).ID(id).Where("repo_id=?", repoID).Exist(new(Milestone))
130130
}

services/issue/milestone.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ func changeMilestoneAssign(ctx context.Context, doer *user_model.User, issue *is
1919
if issue.MilestoneID > 0 {
2020
has, err := issues_model.HasMilestoneByRepoID(ctx, issue.RepoID, issue.MilestoneID)
2121
if err != nil {
22-
return fmt.Errorf("GetMilestoneByRepoID: %v", err)
22+
return fmt.Errorf("HasMilestoneByRepoID: %v", err)
2323
}
2424
if !has {
25-
return fmt.Errorf("GetMilestoneByRepoID: issue doesn't exist")
25+
return fmt.Errorf("HasMilestoneByRepoID: issue doesn't exist")
2626
}
2727
}
2828

0 commit comments

Comments
 (0)