summaryrefslogtreecommitdiffstats
path: root/models/issue_stopwatch.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-04-08 17:11:15 +0800
committerGitHub <noreply@github.com>2022-04-08 17:11:15 +0800
commit1dfa26e00e8e1ce6f6125335871da1d402a63466 (patch)
treed39414fb085ae52d6633ae9d064aabab2e7f75f8 /models/issue_stopwatch.go
parent84ceaa98bd731431c7d3a7f65e59e7ad076a540f (diff)
downloadgitea-1dfa26e00e8e1ce6f6125335871da1d402a63466.tar.gz
gitea-1dfa26e00e8e1ce6f6125335871da1d402a63466.zip
Move milestone to models/issues/ (#19278)
* Move milestone to models/issues/ * Fix lint * Fix test * Fix lint * Fix lint
Diffstat (limited to 'models/issue_stopwatch.go')
-rw-r--r--models/issue_stopwatch.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/models/issue_stopwatch.go b/models/issue_stopwatch.go
index 3be9ad4e3f..80dd44642e 100644
--- a/models/issue_stopwatch.go
+++ b/models/issue_stopwatch.go
@@ -157,11 +157,11 @@ func FinishIssueStopwatch(ctx context.Context, user *user_model.User, issue *Iss
return err
}
- if err := issue.loadRepo(ctx); err != nil {
+ if err := issue.LoadRepo(ctx); err != nil {
return err
}
- if _, err := createComment(ctx, &CreateCommentOptions{
+ if _, err := CreateCommentCtx(ctx, &CreateCommentOptions{
Doer: user,
Issue: issue,
Repo: issue.Repo,
@@ -178,7 +178,7 @@ func FinishIssueStopwatch(ctx context.Context, user *user_model.User, issue *Iss
// CreateIssueStopwatch creates a stopwatch if not exist, otherwise return an error
func CreateIssueStopwatch(ctx context.Context, user *user_model.User, issue *Issue) error {
e := db.GetEngine(ctx)
- if err := issue.loadRepo(ctx); err != nil {
+ if err := issue.LoadRepo(ctx); err != nil {
return err
}
@@ -208,11 +208,11 @@ func CreateIssueStopwatch(ctx context.Context, user *user_model.User, issue *Iss
return err
}
- if err := issue.loadRepo(ctx); err != nil {
+ if err := issue.LoadRepo(ctx); err != nil {
return err
}
- if _, err := createComment(ctx, &CreateCommentOptions{
+ if _, err := CreateCommentCtx(ctx, &CreateCommentOptions{
Doer: user,
Issue: issue,
Repo: issue.Repo,
@@ -249,11 +249,11 @@ func cancelStopwatch(ctx context.Context, user *user_model.User, issue *Issue) e
return err
}
- if err := issue.loadRepo(ctx); err != nil {
+ if err := issue.LoadRepo(ctx); err != nil {
return err
}
- if _, err := createComment(ctx, &CreateCommentOptions{
+ if _, err := CreateCommentCtx(ctx, &CreateCommentOptions{
Doer: user,
Issue: issue,
Repo: issue.Repo,