Security
Guide to configure branch rules in Outpost Hub repositories.
Outpost Hub allows you to use branch rules and CODEOWNERS to efficiently manage your repositories.
Branch rules in Outpost Hub can be applied to individual branches or groups of branches within a repository. These rules help define criteria for PR approvals and merges, control branch creation and deletion, and more.
string
, feature-*
, or releases/**
. You can also set whether the rule applies to the default branch (such as main
). Patterns can include or exclude branches as needed.Here are the rules you can configure, along with any additional settings required:
Rule | Additional Configuration |
---|---|
Block branch creation | Does not affect users in the Bypass List. |
Block branch deletion | Does not affect users in the Bypass List. |
Require pull request | Does not affect users in the Bypass List. |
Require a minimum number of reviewers | Specify the minimum number of reviewers. |
Require review from code owners | Requires a CODEOWNERS file in your branches. Without it, this rule cannot be enforced. |
Require approval of new changes | Must also enable Require a minimum number of reviewers or Require review from code owners. Without these, the rule is ineffective. |
Require comment resolution | None. |
Require change request resolution | None. |
Require status checks to pass | Specify which status checks must pass. |
Limit merge strategies | Select the permitted merge strategies. |
Auto delete branch on merge | None. |
You can toggle branch rules on or off as needed.
The CODEOWNERS file designates users responsible for specific parts of a repository.
When a CODEOWNERS file is present, Outpost Hub
links CODEOWNERS to PRs, though it does not automatically add them as reviewers to avoid unnecessary notifications. You can manually request reviews from CODEOWNERS. If a CODEOWNER reviews a PR independently, they are added as a reviewer for record-keeping. If the Require review from code owners rule is enabled, Outpost
ensures CODEOWNERS are among the PR reviewers, blocking merges if none are present.
Place your CODEOWNERS file in the root of your repository, at docs/CODEOWNERS
, or under .outpost
.
In the CODEOWNERS file for Outpost Hub
, you can assign ownership to users by their email addresses.
You can specify ownership for specific files, directories, or use wildcards. Here are examples of different ways to declare ownership in a CODEOWNERS file:
1Outpost ---
2
3# Global owner
4* @email
5
6# Specific file with multiple owners
7Gemfile.lock @email1 @email2
8
9# Subdirectory owners
10/some_directory/ @email
11/some_directory_2/ @email1 @email2
12
13# Workspace owner
14WORKSPACE @email
15
16# Wildcards
17**/src/** @email
18*.lock @email