@(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 context._ @import gitbucket.core.view.helpers._ @import gitbucket.core.model.WebHook._ @check(bool:Boolean)={@if(bool){ checked}} @html.main(s"Branch protection for ${branch}", Some(repository)){ @html.menu("settings", repository){ @menu("branches", repository){ @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.

}
} } }