File tree 6 files changed +26
-7
lines changed
6 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,11 @@ type Issue struct {
125
125
IsPull bool `xorm:"INDEX"` // Indicates whether is a pull request or not.
126
126
PullRequest * PullRequest `xorm:"-"`
127
127
NumComments int
128
- Ref string
129
- PinOrder int `xorm:"DEFAULT 0"`
128
+
129
+ // TODO: RemoveIssueRef: see "repo/issue/branch_selector_field.tmpl"
130
+ Ref string
131
+
132
+ PinOrder int `xorm:"DEFAULT 0"`
130
133
131
134
DeadlineUnix timeutil.TimeStamp `xorm:"INDEX"`
132
135
Original file line number Diff line number Diff line change
1
+ {{/* TODO: RemoveIssueRef: the Issue.Ref will be removed in 1.24 or 1.25 if no end user really needs it or there could be better alternative then.
2
+ PR: https://github.com/go-gitea/gitea/pull/32744
3
+
4
+ The Issue.Ref was added by Add possibility to record branch or tag information in an issue (#780)
5
+ After 8 years, this "branch selector" does nothing more than saving the branch/tag name into database and displays it.
6
+
7
+ There are still users using it:
8
+ * @didim99: it is a really useful feature to specify a branch in which issue found.
9
+
10
+ Still needs to figure out:
11
+ * Could the "recording branch/tag name" be replaced by other approaches?
12
+ * Write the branch name in the issue title/body then it will still be displayed, eg: `[bug] (fix/ui-broken-bug) there is a bug ....`
13
+ * Is "GitHub-like development sidebar (`#31899`)" good enough (or better) for your usage?
14
+ */}}
1
15
{{if and (not .Issue.IsPull) (not .PageIsComparePull)}}
2
16
<input id="ref_selector" name="ref" type="hidden" value="{{.Reference}}">
3
17
<div class="ui dropdown select-branch branch-selector-dropdown ellipsis-items-nowrap {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}}"
29
43
{{range .Branches}}
30
44
<div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector" title="{{.}}">{{.}}</div>
31
45
{{else}}
32
- <div class="item">{{ctx.Locale.Tr "no_results_found"}}</div>
46
+ <div class="item disabled ">{{ctx.Locale.Tr "no_results_found"}}</div>
33
47
{{end}}
34
48
</div>
35
49
<div id="tag-list" class="scrolling menu reference-list-menu tw-hidden">
39
53
{{range .Tags}}
40
54
<div class="item" data-id="refs/tags/{{.}}" data-name="tags/{{.}}" data-id-selector="#ref_selector">{{.}}</div>
41
55
{{else}}
42
- <div class="item">{{ctx.Locale.Tr "no_results_found"}}</div>
56
+ <div class="item disabled ">{{ctx.Locale.Tr "no_results_found"}}</div>
43
57
{{end}}
44
58
</div>
45
59
</div>
Original file line number Diff line number Diff line change 47
47
</div>
48
48
49
49
<div class="issue-content-right ui segment">
50
- {{template "repo/issue/branch_selector_field" $}}
50
+ {{template "repo/issue/branch_selector_field" $}}{{/* TODO: RemoveIssueRef: template "repo/issue/branch_selector_field" $*/}}
51
+
51
52
{{if .PageIsComparePull}}
52
53
{{template "repo/issue/sidebar/reviewer_list" $.IssuePageMetaData}}
53
54
<div class="divider"></div>
Original file line number Diff line number Diff line change 1
1
<div class="issue-content-right ui segment">
2
- {{template "repo/issue/branch_selector_field" $}}
2
+ {{template "repo/issue/branch_selector_field" $}}{{/* TODO: RemoveIssueRef: template "repo/issue/branch_selector_field" $*/}}
3
3
4
4
{{if .Issue.IsPull}}
5
5
{{template "repo/issue/sidebar/reviewer_list" $.IssuePageMetaData}}
Original file line number Diff line number Diff line change 99
99
<span class="gt-ellipsis">{{.Project.Title}}</span>
100
100
</a>
101
101
{{end}}
102
- {{if .Ref}}
102
+ {{if .Ref}}{{/* TODO: RemoveIssueRef: see "repo/issue/branch_selector_field.tmpl" */}}
103
103
<a class="ref flex-text-inline tw-max-w-[300px]" {{if $.RepoLink}}href="{{index $.IssueRefURLs .ID}}"{{else}}href="{{.Repo.Link}}{{index $.IssueRefURLs .ID}}"{{end}}>
104
104
{{svg "octicon-git-branch" 14}}
105
105
<span class="gt-ellipsis">{{index $.IssueRefEndNames .ID}}</span>
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import {queryElems, toggleElem} from '../utils/dom.ts';
4
4
import { initIssueSidebarComboList } from './repo-issue-sidebar-combolist.ts' ;
5
5
6
6
function initBranchSelector ( ) {
7
+ // TODO: RemoveIssueRef: see "repo/issue/branch_selector_field.tmpl"
7
8
const elSelectBranch = document . querySelector ( '.ui.dropdown.select-branch' ) ;
8
9
if ( ! elSelectBranch ) return ;
9
10
You can’t perform that action at this time.
0 commit comments