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:
136
136
> This is pull request [ !1234] ( # ) , and links to a pull request in Gitea.
137
137
138
138
The ` ! ` 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.
140
141
141
142
## Issues and Pull Requests References Summary
142
143
Original file line number Diff line number Diff line change @@ -390,6 +390,13 @@ func (pr *PullRequest) GetDefaultSquashMessage() string {
390
390
log .Error ("LoadIssue: %v" , err )
391
391
return ""
392
392
}
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
+ }
393
400
return fmt .Sprintf ("%s (#%d)" , pr .Issue .Title , pr .Issue .Index )
394
401
}
395
402
You can’t perform that action at this time.
0 commit comments