ComplyJet's GitHub branch checks (branch protection, required pull request reviews, and admin enforcement) evaluate each repository's default branch. If the branch that actually ships to production is a different one, such as release or production, you can tell ComplyJet which branch to check by setting a custom property in GitHub.
How it works
You create a repository custom property named complyjet_production_branch_name in your GitHub organization and set its value to the branch name on each repository you want to override. Repositories that don't set it keep using their default branch, so you only need to set it where the two differ.
Nothing needs to change in your ComplyJet connection. ComplyJet reads the property with the access your GitHub connection already has, so you won't be asked to approve any new permissions.
Set it up
In GitHub, open your organization's Settings and go to Custom properties (this needs an organization owner).
Click New property and name it exactly
complyjet_production_branch_name. Set the type to Text. Leave it optional with no default value.For each repository that should be checked on a non-default branch, set the property's value to that branch name, for example
release. You can do this from the repository's own Settings, or in bulk from the organization's repository list.In ComplyJet, run the code checks again (or wait for the next scheduled run). The property is read each time the checks run, so no separate sync is needed.
Confirm it worked
Open the code check results, such as the check that code changes require review. Each repository's result names the branch it was evaluated on, for example "...required before merging into the 'release' branch." A repository that doesn't set the property is evaluated on its default branch.
Which checks use it
The production branch is used by the GitHub checks that read branch protection: the check that code changes require review, and the check that branch protection is enforced for administrators.
Good to know
One branch per repository. If you ship from several branches, the check covers only the one named in the property.
Use a plain branch name. Letters, numbers, dots, underscores, hyphens, and slashes (like
release/stable) are supported. Anything else is ignored and the default branch is used.If the branch doesn't exist, the check fails and says that the production branch set by the property wasn't found in that repository. Fix the value (or remove it) and run the checks again.
Branch protection rules only. These checks read classic branch protection rules on the branch. Protection configured only through GitHub rulesets isn't evaluated.
Private repositories on GitHub's free plan. GitHub doesn't provide branch protection details for these, so the check can't confirm protection even if it is set up.
Auditors. If an auditor asks why a repository is checked on a non-default branch, the property in GitHub is the record of that decision.
