@(repository: gitbucket.core.service.RepositoryService.RepositoryInfo, branch: String, protection: gitbucket.core.api.ApiBranchProtection, knownContexts: Seq[String], info: Option[Any])(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers @check(bool:Boolean)={@if(bool){ checked}} @gitbucket.core.html.main(s"Branch protection for ${branch}", Some(repository)){ @gitbucket.core.html.menu("settings", repository){ @gitbucket.core.settings.html.menu("branches", repository){ @gitbucket.core.helper.html.information(info)
Branch protection options saved
Branch protection for @branch
Protect this branch

Disables force-pushes to this branch and prevents it from being deleted.

Require status checks to pass before merging

When enabled, commits must first be pushed to another branch, then merged or pushed directly to @branch after status checks have passed.

@if( knownContexts.isEmpty ){
Sorry, we couldn’t find any status checks in the last week for this repository.
Please create a commit status by API (Learn more about status checks on GitHub)
} else {
Choose which status checks must pass before branches can be merged into @branch.
@knownContexts.map { context =>
@context
}
Include administrators

Enforce required status checks for repository administrators.

}
} } }