File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,8 @@ the `!` marker to identify pull requests. For example:
136136> This is pull request [ !1234] ( # ) , and links to a pull request in Gitea.
137137
138138The ` ! ` and ` # ` can be used interchangeably for issues and pull request _ except_
139- for this case, where a distinction is required.
139+ for this case, where a distinction is required. If the repository uses external
140+ tracker, commit message for squash merge will use ` ! ` as reference by default.
140141
141142## Issues and Pull Requests References Summary
142143
Original file line number Diff line number Diff line change @@ -390,6 +390,13 @@ func (pr *PullRequest) GetDefaultSquashMessage() string {
390390 log .Error ("LoadIssue: %v" , err )
391391 return ""
392392 }
393+ if err := pr .LoadBaseRepo (); err != nil {
394+ log .Error ("LoadBaseRepo: %v" , err )
395+ return ""
396+ }
397+ if pr .BaseRepo .UnitEnabled (UnitTypeExternalTracker ) {
398+ return fmt .Sprintf ("%s (!%d)" , pr .Issue .Title , pr .Issue .Index )
399+ }
393400 return fmt .Sprintf ("%s (#%d)" , pr .Issue .Title , pr .Issue .Index )
394401}
395402
You can’t perform that action at this time.
0 commit comments