Skip to main content
The Rules page (Admin tools → Rules) has four tabs:
  • PR exclusions – pull requests to leave out of analytics: release-train merges, sync PRs, bot branches, noise.
  • Deployments – overrides for how Bilanc detects production deployments per repository, used by the DORA metrics.
  • Repositories – what Bilanc detected for every repository (branching model, production branches, deployment source) with the evidence, and an Override button.
  • Suggested – rules Bilanc thinks you should add, with the evidence. Accept, edit or dismiss each one. Nothing is applied without your say-so.
Rules are per organisation and never delete data; disabling or deleting one restores the affected rows on the next hourly refresh.

PR exclusion rules

A rule describes the pull requests to throw away — a PR that matches an enabled rule is dropped from PR analytics. There’s no “keep only these” mode; to keep a narrow set, exclude everything that isn’t in it using the negated match types.
  • Within a rule, the conditions (repositories, source branch, target branch, title) are AND-ed — a PR matches only if it satisfies all of them.
  • Across rules, matching any enabled rule is enough to exclude a PR. Add more rules to exclude more things.
An excluded pull request is removed from Bilanc entirely, so it also stops being a deployment event. If you exclude promotion PRs (dev → main) in a gitflow repository, the pull requests they carried can no longer get a deploy time from them. For DORA, prefer leaving promotions in: they are flagged is_promotion_pr in Data Explorer and you can filter them out of throughput there.

Git terminology: source vs target

A PR always flows source → target.
base_ref is the target branch, not the source. In git PR terms, base is the branch you merge into. “Exclude PRs that go into production” is a Target branch condition.
The mapping is the same across GitHub, GitLab, Bitbucket, and Azure DevOps.

Conditions and match types

Repositories has no match type — listed repos scope the rule to those repos; empty means all repos. The other three fields take a list of values (comma- or newline-separated) plus a match type. Matching is always case-insensitive. Leaving a field blank ignores it. The negated types are how you express “keep only X”: exclude every PR whose target branch is not production keeps exactly the production-targeting PRs.

Example: keep only one target branch in one repo

Goal: in one repository, keep only PRs merging into production and exclude everything else, leaving all other repositories untouched. This excludes any PR in that repo whose target branch isn’t production. Because the repository is scoped, no other repo is affected.
Don’t use Equal here — that would drop the production PRs you want to keep. The negation (production + Not equal) is correct.

Common patterns

Each row is one rule. Conditions within a rule are AND-ed — to exclude on either of two conditions independently, create two rules.

Deployment rules

Bilanc works out how each repository ships on its own (see how Bilanc detects a production deployment and how Bilanc reads your branching model). Most repositories need no rule. Deployment rules are for the cases it cannot know: a production branch called k8s-main, a deploy pipeline called just CD, a repository that should not count at all. Repository-specific rules beat organisation-wide ones. Rules take effect on the next hourly refresh, and the Repositories tab shows configured as the branching model for repositories a production-branches rule covers.

Worked examples

The Repositories tab

One row per repository with merged pull requests in the last year:
  • Model: trunk, gitflow, release_branches, trunk_on_nondefault, mixed, insufficient_data, or configured when a rule applies. Hover for the plain-English meaning.
  • Production and integration branches Bilanc is using.
  • Confidence: high, medium or low. Low usually means Bilanc could not tell what production is; there is normally a suggestion waiting for it.
  • Source: the deployment source in use over the last 180 days (github_release, workflow_run, bitbucket_deployment, merge_to_default) and when the last deployment was.
  • Evidence: merge share per branch, promotion PRs found, branches releases and deploy runs were cut from.
Override opens a production-branches rule pre-filled for that repository.

Suggestions

After every data refresh Bilanc looks for rules it thinks you should add and lists them in the Suggested tab with the evidence and a confidence. It suggests, never applies: Accept enables the rule. Edit lets you change it before accepting. Dismiss keeps it disabled and stops Bilanc suggesting it again. Suggestions the data no longer supports disappear on their own. PR exclusion suggestions use the same mechanism and will appear in the same tab.
Rules apply only to enabled rows and take effect on the next analytics refresh. They don’t modify underlying data.