You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: patterns/1-initial/centralised-repository-governance.md
+29-22Lines changed: 29 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,54 +1,58 @@
1
-
#**Centralised Repository Governance**
1
+
## Title
2
2
3
-
## **Patlet**
3
+
Centralised Repository Governance
4
4
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
6
6
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.
7
8
8
-
## **Problem**
9
+
10
+
## Problem
9
11
10
12
As organisations grow, each team naturally sets up repositories in their own way. Over time, these settings begin to diverge:
11
13
12
14
* branch protection disappears or becomes inconsistent,
* and new repositories start life without any safeguards at all.
17
19
18
20
No one notices immediately, and no one does it on purpose. It just... happens.
19
21
Manual audits are slow and rarely complete. Before long, the organisation has dozens of small risks scattered everywhere, hidden in plain sight.
20
22
21
-
## **Story**
23
+
## Story
22
24
23
25
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.
24
26
25
-
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.
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.
26
28
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.
28
30
29
31
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.
31
35
32
36
Within a month, the number of incidents dropped, standards became consistent, and onboarding new repos felt effortless.
33
-
The best part? No one’s 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.
34
38
35
-
## **Context**
39
+
## Context
36
40
37
41
* Many repositories exist across multiple teams.
38
42
* Teams have the freedom to configure their own repos.
39
43
* Engineering or security leadership expects a shared baseline.
40
44
* Visibility across all repos is limited.
41
45
* GitHub Actions or similar tooling is available for automation.
42
46
43
-
## **Forces**
47
+
## Forces
44
48
45
49
***Autonomy vs alignment:** Teams need freedom to build, but consistent safeguards matter.
46
50
***Scale:** Manual reviews fail once repository numbers grow.
47
51
***Transparency:** Policies should be easy to understand and open to contribution.
48
52
***Low friction:** Governance should guide, not block.
49
53
***Early warning:** Small mistakes should surface before they turn into costly incidents.
50
54
51
-
## **Solution**
55
+
## Solutions
52
56
53
57
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.
54
58
@@ -77,7 +81,7 @@ require_signed_commits: true
77
81
enforce_admins: true
78
82
```
79
83
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".
81
85
82
86
### **2. Audit Engine**
83
87
@@ -122,7 +126,7 @@ It collects findings, creates a summary report, and optionally:
122
126
* No blocking behaviour
123
127
* Clear, actionable reporting
124
128
125
-
## **Resulting Context**
129
+
## Resulting Context
126
130
127
131
* Repository settings become more consistent and predictable.
128
132
* Drift is found early rather than after an incident.
@@ -131,34 +135,37 @@ It collects findings, creates a summary report, and optionally:
131
135
* New repositories inherit standards from day one.
132
136
* Leadership gains confidence in organisational hygiene without micromanagement.
133
137
134
-
## **Use This Pattern When**
138
+
## Use This Pattern When
135
139
136
140
* You have many repositories owned by different teams.
137
141
* You want reliable, repeatable engineering safeguards.
138
142
* You prefer guidance rather than strict enforcement.
139
143
* You want policies to be version-controlled and adaptable.
140
144
* You want to reduce manual audit work and platform overhead.
141
145
142
-
## **Don’t Use This Pattern When**
146
+
## Do Not Use This Pattern When
143
147
144
148
* Only a few repositories exist and manual checks are enough.
145
149
* You need hard, immediate enforcement at merge time.
146
150
* Baseline policies change too frequently to maintain.
147
151
* 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.
150
153
151
-
## **Known Instances**
154
+
## Known Instances
152
155
153
156
* Large technology organisations using GitHub Enterprise.
154
157
* Platform teams responsible for organisational governance and lifecycle tooling.
155
158
* Engineering groups moving towards policy-as-code and automation.
156
159
157
-
## **Authors**
160
+
## Status
161
+
162
+
* Initial
163
+
164
+
## Author(s)
158
165
159
166
[Amburi Roy](https://www.linkedin.com/in/amburi/)
160
167
161
-
## **Related Patterns**
168
+
## Related Patterns
162
169
163
170
* **Automated Testing** — shared automated checks for quality.
164
171
* **InnerSource Product Owner** — helps with stewardship of the governance repo.
0 commit comments