diff options
author | Zettat123 <zettat123@gmail.com> | 2024-10-14 03:58:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-13 22:58:13 +0300 |
commit | 74664b08a004393ce013e872e47901f52645b65a (patch) | |
tree | 0ab4db690d087f57697a32f9ea32a3b6bfa4896e /services/migrations/gitea_uploader.go | |
parent | 9df5ddaf44aa5a3f319acba7b18645b7b1d4d8a2 (diff) | |
download | gitea-74664b08a004393ce013e872e47901f52645b65a.tar.gz gitea-74664b08a004393ce013e872e47901f52645b65a.zip |
Support migrating GitHub/GitLab PR draft status (#32242)
Resolve #32196
Diffstat (limited to 'services/migrations/gitea_uploader.go')
-rw-r--r-- | services/migrations/gitea_uploader.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/migrations/gitea_uploader.go b/services/migrations/gitea_uploader.go index 4c8e036f05..eb21b6534b 100644 --- a/services/migrations/gitea_uploader.go +++ b/services/migrations/gitea_uploader.go @@ -760,10 +760,15 @@ func (g *GiteaLocalUploader) newPullRequest(pr *base.PullRequest) (*issues_model pr.Updated = pr.Created } + prTitle := pr.Title + if pr.IsDraft && !issues_model.HasWorkInProgressPrefix(pr.Title) { + prTitle = fmt.Sprintf("%s %s", setting.Repository.PullRequest.WorkInProgressPrefixes[0], pr.Title) + } + issue := issues_model.Issue{ RepoID: g.repo.ID, Repo: g.repo, - Title: pr.Title, + Title: prTitle, Index: pr.Number, Content: pr.Content, MilestoneID: milestoneID, |