fix: make "edit pr title & target branch" get correct branch (#39612)

* Fix #39610
* Regression of #39262

Also, the old code is very fragile: `#branch_target` is from translation
string, so refactored it together

---------

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
wxiaoguangandsilverwind authored and GitHub committed 2026-10-05 20:29:33 +00:00
1 parent 4e2c3e43f2
commit b1726adebb
3 files changed
+36 -8

No files matched your search

+1 -1
View File
@@ -103,7 +103,7 @@
{{svg "octicon-arrow-right"}}
<div class="ui floating dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}">
<div class="ui basic small button">
<span id="pull-target-branch" class="gt-ellipsis" data-base-user-name="{{$baseUserName}}" data-text-compare-base="{{ctx.Locale.Tr "repo.pulls.compare_base"}}">
<span id="pull-target-branch" class="gt-ellipsis" data-base-user-name="{{$baseUserName}}" data-old-target-branch="{{$baseBranch}}" data-branch="{{$baseBranch}}" data-text-compare-base="{{ctx.Locale.Tr "repo.pulls.compare_base"}}">
{{ctx.Locale.Tr "repo.pulls.compare_base"}}: {{$baseUserName}}:{{$baseBranch}}
</span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}}