mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-05-06 15:15:27 +02:00
(refs #1242) Bugfix in branch protection for branches which contain /
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<select name="protectBranch" id="protectBranch" onchange="location=$(this).val()" class="form-control">
|
||||
<option>Choose a branch...</option>
|
||||
@repository.branchList.map { branch =>
|
||||
<option value="@helpers.url(repository)/settings/branches/@helpers.encodeRefName(branch)">@branch</option>
|
||||
<option value="@helpers.url(repository)/settings/branches/@helpers.urlEncode(branch)">@branch</option>
|
||||
}
|
||||
</select>
|
||||
<span class="error" id="error-protectBranch"></span>
|
||||
|
||||
@@ -110,7 +110,7 @@ function submitForm(e){
|
||||
var protection = getValue();
|
||||
$.ajax({
|
||||
method:'PATCH',
|
||||
url:'@context.path/api/v3/repos/@repository.owner/@repository.name/branches/@helpers.encodeRefName(branch)',
|
||||
url:'@context.path/api/v3/repos/@repository.owner/@repository.name/branches/@helpers.urlEncode(branch)',
|
||||
contentType: 'application/json',
|
||||
dataType: 'json',
|
||||
data:JSON.stringify({protection:protection}),
|
||||
|
||||
Reference in New Issue
Block a user