mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-02 16:35:19 +02:00
Move milestone to models/issues/ (#19278)
* Move milestone to models/issues/ * Fix lint * Fix test * Fix lint * Fix lint
This commit is contained in:
parent
84ceaa98bd
commit
1dfa26e00e
56 changed files with 466 additions and 447 deletions
|
@ -53,7 +53,7 @@ func (t *TrackedTime) loadAttributes(ctx context.Context) (err error) {
|
|||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = t.Issue.loadRepo(ctx)
|
||||
err = t.Issue.LoadRepo(ctx)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -170,11 +170,11 @@ func AddTime(user *user_model.User, issue *Issue, amount int64, created time.Tim
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if err := issue.loadRepo(ctx); err != nil {
|
||||
if err := issue.LoadRepo(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if _, err := createComment(ctx, &CreateCommentOptions{
|
||||
if _, err := CreateCommentCtx(ctx, &CreateCommentOptions{
|
||||
Issue: issue,
|
||||
Repo: issue.Repo,
|
||||
Doer: user,
|
||||
|
@ -254,10 +254,10 @@ func DeleteIssueUserTimes(issue *Issue, user *user_model.User) error {
|
|||
return ErrNotExist{}
|
||||
}
|
||||
|
||||
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{
|
||||
Issue: issue,
|
||||
Repo: issue.Repo,
|
||||
Doer: user,
|
||||
|
@ -286,7 +286,7 @@ func DeleteTime(t *TrackedTime) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if _, err := createComment(ctx, &CreateCommentOptions{
|
||||
if _, err := CreateCommentCtx(ctx, &CreateCommentOptions{
|
||||
Issue: t.Issue,
|
||||
Repo: t.Issue.Repo,
|
||||
Doer: t.User,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue