Skip to content

Commit 38077cb

Browse files
committed
Revisited pattern template
1 parent 6480e13 commit 38077cb

File tree

1 file changed

+29
-22
lines changed

1 file changed

+29
-22
lines changed

patterns/1-initial/centralised-repository-governance.md

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,58 @@
1-
# **Centralised Repository Governance**
1+
## Title
22

3-
## **Patlet**
3+
Centralised Repository Governance
44

5-
It’s easy for repository settings to drift when many teams manage their own projects. A central governance repository, backed by automated nightly audits, helps keep everything aligned with the organisation’s engineering standards while allowing teams to work freely.
5+
## Patlet
66

7+
It's easy for repository settings to drift when many teams manage their own projects. A central governance repository, backed by automated nightly audits, helps keep everything aligned with the organisation's engineering standards while allowing teams to work freely.
78

8-
## **Problem**
9+
10+
## Problem
911

1012
As organisations grow, each team naturally sets up repositories in their own way. Over time, these settings begin to diverge:
1113

1214
* branch protection disappears or becomes inconsistent,
13-
* workflow permissions expand beyond whats allowed,
15+
* workflow permissions expand beyond what's allowed,
1416
* CODEOWNERS files go missing,
1517
* admin bypass quietly slips in,
1618
* and new repositories start life without any safeguards at all.
1719

1820
No one notices immediately, and no one does it on purpose. It just... happens.
1921
Manual audits are slow and rarely complete. Before long, the organisation has dozens of small risks scattered everywhere, hidden in plain sight.
2022

21-
## **Story**
23+
## Story
2224

2325
A platform team in a large engineering organisation realised something worrying: every few weeks, a production incident or security concern could be traced back to a simple repository misconfiguration. Nothing dramatic—just things like a missing review requirement or an overly generous GitHub Actions permission.
2426

25-
People werent careless; they were busy. They moved fast, created new repos, copied old workflows, and tweaked settings when needed. Over time, these changes compounded into a patchwork of configurations.
27+
People weren't careless; they were busy. They moved fast, created new repos, copied old workflows, and tweaked settings when needed. Over time, these changes compounded into a patchwork of configurations.
2628

27-
Instead of telling every team to be more careful, the platform team built a small governance repository. It held a clear, versioned baseline of expected repo settings, and each night a GitHub Action scanned every repository, comparing it with the baseline.
29+
Instead of telling every team to "be more careful", the platform team built a small governance repository. It held a clear, versioned baseline of expected repo settings, and each night a GitHub Action scanned every repository, comparing it with the baseline.
2830

2931
The next morning, teams received a calm, simple report:
30-
**Here’s what changed. Here’s where drift happened. Here’s how to fix it.**
32+
* Here's what changed.
33+
* Here's where drift happened.
34+
* Here's how to fix it.
3135

3236
Within a month, the number of incidents dropped, standards became consistent, and onboarding new repos felt effortless.
33-
The best part? No ones workflow was interrupted. The whole system quietly supported good engineering hygiene in the background.
37+
The best part? No one's workflow was interrupted. The whole system quietly supported good engineering hygiene in the background.
3438

35-
## **Context**
39+
## Context
3640

3741
* Many repositories exist across multiple teams.
3842
* Teams have the freedom to configure their own repos.
3943
* Engineering or security leadership expects a shared baseline.
4044
* Visibility across all repos is limited.
4145
* GitHub Actions or similar tooling is available for automation.
4246

43-
## **Forces**
47+
## Forces
4448

4549
* **Autonomy vs alignment:** Teams need freedom to build, but consistent safeguards matter.
4650
* **Scale:** Manual reviews fail once repository numbers grow.
4751
* **Transparency:** Policies should be easy to understand and open to contribution.
4852
* **Low friction:** Governance should guide, not block.
4953
* **Early warning:** Small mistakes should surface before they turn into costly incidents.
5054

51-
## **Solution**
55+
## Solutions
5256

5357
Create a **central governance repository** that stores baseline policies as code and runs a scheduled audit—usually nightly—to compare real repository configurations against the baseline.
5458

@@ -77,7 +81,7 @@ require_signed_commits: true
7781
enforce_admins: true
7882
```
7983
80-
These files become the shared, reviewable definition of how we configure repositories here.
84+
These files become the shared, reviewable definition of "how we configure repositories here".
8185
8286
### **2. Audit Engine**
8387
@@ -122,7 +126,7 @@ It collects findings, creates a summary report, and optionally:
122126
* No blocking behaviour
123127
* Clear, actionable reporting
124128

125-
## **Resulting Context**
129+
## Resulting Context
126130

127131
* Repository settings become more consistent and predictable.
128132
* Drift is found early rather than after an incident.
@@ -131,34 +135,37 @@ It collects findings, creates a summary report, and optionally:
131135
* New repositories inherit standards from day one.
132136
* Leadership gains confidence in organisational hygiene without micromanagement.
133137

134-
## **Use This Pattern When**
138+
## Use This Pattern When
135139

136140
* You have many repositories owned by different teams.
137141
* You want reliable, repeatable engineering safeguards.
138142
* You prefer guidance rather than strict enforcement.
139143
* You want policies to be version-controlled and adaptable.
140144
* You want to reduce manual audit work and platform overhead.
141145

142-
## **Don’t Use This Pattern When**
146+
## Do Not Use This Pattern When
143147

144148
* Only a few repositories exist and manual checks are enough.
145149
* You need hard, immediate enforcement at merge time.
146150
* Baseline policies change too frequently to maintain.
147151
* A GitHub App or read-access token cannot be used.
148-
* Most teams require unique repo configurations that don’t fit a shared baseline.
149-
152+
* Most teams require unique repo configurations that don't fit a shared baseline.
150153

151-
## **Known Instances**
154+
## Known Instances
152155

153156
* Large technology organisations using GitHub Enterprise.
154157
* Platform teams responsible for organisational governance and lifecycle tooling.
155158
* Engineering groups moving towards policy-as-code and automation.
156159

157-
## **Authors**
160+
## Status
161+
162+
* Initial
163+
164+
## Author(s)
158165

159166
[Amburi Roy](https://www.linkedin.com/in/amburi/)
160167

161-
## **Related Patterns**
168+
## Related Patterns
162169

163170
* **Automated Testing** — shared automated checks for quality.
164171
* **InnerSource Product Owner** — helps with stewardship of the governance repo.

0 commit comments

Comments
 (0)