mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-19 08:20:13 +00:00
Support migrating GitHub/GitLab PR draft status (#32242)
Resolve #32196 (cherry picked from commit 74664b08a004393ce013e872e47901f52645b65a)
This commit is contained in:
parent
dfe9bdd15f
commit
89446e60a6
4 changed files with 9 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue