Enabling GitHub’s required status checks for branch protection ensures that no pull requests are merged unless they are free of issues, automatically detected by the VIP Code Analysis Bot (the Bot). This enforces a workflow where pull requests require developers to get clearance from the VIP Code Analysis Bot before they can merge the code.
- Navigate to an application’s GitHub repository. This URL can be found in the application’s VIP Dashboard.
- Under the repository name, select the Settings tab.
- In the “Code and automation” section of the sidebar, select Branches.
- Next to “Branch protection rules”, select Add rule.
- In the field below “Branch name pattern”, type the branch name or pattern to protect.
- Under “Protect matching branches”, enable “Require status checks to pass before merging“.
- (Optional but recommended) Enable “Require branches to be up to date before merging“. This ensures pull requests targeting a matching branch have been tested with the most recent code.
- In the search field, search for “VIP Code Analysis Bot” and select it in the results provided. This option will not be available if the Bot has not interacted with the repo in the past 7 days. This can be remedied by creating a or modifying an existing pull request.
- Select the “Create” button.
Last updated: September 20, 2023