mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 18:17:19 +00:00
* Explicitly refer to PR in squash-merge commit message in case of external tracker * documentation Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
committed by
Lunny Xiao
parent
95cb921097
commit
aa6ed1b7c1
@ -385,6 +385,13 @@ func (pr *PullRequest) GetDefaultSquashMessage() string {
|
||||
log.Error("LoadIssue: %v", err)
|
||||
return ""
|
||||
}
|
||||
if err := pr.LoadBaseRepo(); err != nil {
|
||||
log.Error("LoadBaseRepo: %v", err)
|
||||
return ""
|
||||
}
|
||||
if pr.BaseRepo.UnitEnabled(UnitTypeExternalTracker) {
|
||||
return fmt.Sprintf("%s (!%d)", pr.Issue.Title, pr.Issue.Index)
|
||||
}
|
||||
return fmt.Sprintf("%s (#%d)", pr.Issue.Title, pr.Issue.Index)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user