diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-10-11 14:44:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-11 14:44:43 +0800 |
commit | 46a12f196b1742a2462259ed3dd9c33c4c2f150b (patch) | |
tree | b8203c7d6d91841ce53a7b875135714b372fa1a5 /integrations | |
parent | 9ff9f5ad1d8d2680c9c146831458afdbd4e641df (diff) | |
download | gitea-46a12f196b1742a2462259ed3dd9c33c4c2f150b.tar.gz gitea-46a12f196b1742a2462259ed3dd9c33c4c2f150b.zip |
Move change issue title from models to issue service package (#8456)
* move change issue title from models to issue service package
* make the change less
* fix typo
Diffstat (limited to 'integrations')
-rw-r--r-- | integrations/api_pull_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/integrations/api_pull_test.go b/integrations/api_pull_test.go index 8d24cdc188..ed5a55a9db 100644 --- a/integrations/api_pull_test.go +++ b/integrations/api_pull_test.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + issue_service "code.gitea.io/gitea/services/issue" "github.com/stretchr/testify/assert" ) @@ -40,7 +41,7 @@ func TestAPIMergePullWIP(t *testing.T) { owner := models.AssertExistsAndLoadBean(t, &models.User{ID: repo.OwnerID}).(*models.User) pr := models.AssertExistsAndLoadBean(t, &models.PullRequest{Status: models.PullRequestStatusMergeable}, models.Cond("has_merged = ?", false)).(*models.PullRequest) pr.LoadIssue() - pr.Issue.ChangeTitle(owner, setting.Repository.PullRequest.WorkInProgressPrefixes[0]+" "+pr.Issue.Title) + issue_service.ChangeTitle(pr.Issue, owner, setting.Repository.PullRequest.WorkInProgressPrefixes[0]+" "+pr.Issue.Title) // force reload pr.LoadAttributes() |