Merge pull request #2519 from gitbucket/fix-branch-setting

Handle branch contains / properly in branch settings
This commit is contained in:
SIkebe
2020-08-23 01:57:55 +09:00
committed by GitHub

View File

@@ -177,9 +177,10 @@ trait RepositorySettingsControllerBase extends ControllerBase {
})
/** Branch protection for branch */
get("/:owner/:repository/settings/branches/:branch")(ownerOnly { repository =>
get("/:owner/:repository/settings/branches/*")(ownerOnly { repository =>
import gitbucket.core.api._
val branch = params("branch")
val branch = params("splat")
if (!repository.branchList.contains(branch)) {
redirect(s"/${repository.owner}/${repository.name}/settings/branches")
} else {