Where Should Repository Variables, Secrets, and Branch Rules Live?
If changing one setting in project A changes another team's builds, the screen misrepresented the scope of the change. How to place each setting by owning resource, editing role, and affected runs, and how to tell inheritable values apart from enforced policy.
An admin on project A raised the test timeout from 10 minutes to 20. The next day, project B's builds started waiting 20 minutes too. Both projects use the same repository, and A's settings screen had been editing the repository-wide value directly. The admin had project A selected the whole time. The screen misrepresented how far the change would reach.
A setting should be edited where its owning resource lives. If a project screen can change a repository-wide value, the admin has no way of knowing they are also changing another team's next build.
Where does each setting's source of truth belong?
When placing a setting, write down three things together: the resource that owns the value, the role allowed to change it, and the runs affected by the change. Even for two teams on the same repository, the items below have different owners. (The project setup is illustrative.)
| Setting | Where the source of truth lives | Who can change it, and where it applies |
|---|---|---|
| Shared build timeout | Repository settings | Repository admins edit it. Applies to A's and B's CI wherever they reference the shared value. |
| Extra wait time for A's integration test | A's pipeline definition | A's CI editors change that job's input, within the range the shared policy allows. |
| Production deploy secret | B's production environment or the specific deploy target | Production credential managers rotate it. Approved jobs' executors are granted use. |
Required reviews on main | The repository's branch rules | That rule's admins change it. Applies to the same branch whether A or B makes the request. |
Can "inheritance" explain every setting?
Inheritance alone can't. Ordinary variables can allow per-project overrides, but protection rules such as required reviews must not be loosened from a lower-level screen. If the organization requires two reviewers, letting A's admin drop that to one on their own screen means the policy isn't being enforced. GitHub rulesets work this way: rules that target the same branch are aggregated, and when the same rule has different parameters, the most restrictive one applies.
Where the project screen shines is in showing the value that will apply to the current run, and where it came from. For example: Build timeout 10 min · inherited from repository, with A's permitted change marked applies to this pipeline only. For secrets, the reference name and whether it is usable are enough. Who rotates the value, who uses it at runtime, and who can read the plaintext can each be decided separately. CollabOps' environment variables docs likewise reference organization- and repository-level variables (vars) and secrets (secrets) separately from the env values defined inside a workflow.
How do you review a settings screen?
When reviewing a settings screen, ask one question before hitting save: "Does this change alter another team's next deploy?" If an admin can answer that from the screen alone, the menu placement and the permission design are telling the same story.
- #permissions
- #cicd
- #secrets
- #git
- #developer-experience