Skip to content

Commit 9e36b25

Browse files
author
Gitea
committed
Remove filter for empty branch name
1 parent 20f10af commit 9e36b25

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

public/js/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

routers/repo/issue.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,10 +1068,6 @@ func UpdateIssueRef(ctx *context.Context) {
10681068
}
10691069

10701070
ref := ctx.QueryTrim("ref")
1071-
if len(ref) == 0 {
1072-
ctx.Error(204)
1073-
return
1074-
}
10751071

10761072
if err := issue_service.ChangeIssueRef(issue, ctx.User, ref); err != nil {
10771073
ctx.ServerError("ChangeRef", err)

templates/repo/issue/branch_selector_field.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@
3030
</a>
3131
</div>
3232
</div>
33+
3334
</div>
3435
<div id="branch-list" class="scrolling menu reference-list-menu">
36+
{{if .Issue.Ref}}
37+
<div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">Clear current reference</a></strong></div>
38+
{{end}}
3539
{{range .Branches}}
3640
<div class="item" data-id="{{.}}" data-id-selector="#ref_selector">{{.}}</div>
3741
{{end}}

web_src/js/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ function initBranchSelector() {
110110
_csrf: csrf,
111111
ref: selectedValue
112112
},
113-
(data) => {
114-
$selectBranch.find('.ui .branch-name').text(data.ref);
113+
() => {
114+
window.location.reload();
115115
});
116116
}
117117
});

0 commit comments

Comments
 (0)