Skip to content

Commit 8c3a01e

Browse files
committed
Add Centralised InnerSource Repository Governance pattern
Update centralised-repository-governance.md
1 parent 34b416b commit 8c3a01e

1 file changed

Lines changed: 214 additions & 0 deletions

File tree

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
## Title
2+
3+
Centralised InnerSource Repository Governance
4+
5+
## Patlet
6+
7+
InnerSource repositories become difficult to discover, understand, and contribute to when project hygiene drifts across teams. A central governance repository can define InnerSource readiness checks as policy-as-code and run automated audits that help project owners keep their repositories contributor-friendly without removing local ownership.
8+
9+
## Problem
10+
11+
As InnerSource adoption grows, teams publish repositories with different levels of documentation, ownership clarity, contribution guidance, communication channels, and discoverability metadata. Some repositories have a strong `README.md` and `CONTRIBUTING.md`; others have no maintainer contact, no issue templates, unclear CODEOWNERS, stale labels, or no signal that outside contributions are welcome.
12+
13+
These gaps make contributors hesitate. They cannot tell whether a repository is active, who owns it, how to ask questions, what kind of contribution is welcome, or whether the project follows the organisation's InnerSource standards. Manual checks by an InnerSource Program Office, platform team, or community group do not scale once many teams publish projects.
14+
15+
## Story
16+
17+
An InnerSource Program Office noticed that contributors often gave up before opening a pull request. The source code was visible, but the contribution path was unclear. Some repositories had no `CONTRIBUTING.md`; others had outdated contact information or no issue labels that helped newcomers find suitable work.
18+
19+
Instead of asking every team to remember a checklist, the program office created a governance repository. It stored the organisation's InnerSource readiness expectations as versioned policies and ran scheduled audits across participating repositories.
20+
21+
Project owners received a simple report: which InnerSource readiness checks passed, which ones needed attention, who owned the repository, and where to find remediation guidance. The audit did not block teams. It helped them make their projects easier to discover, understand, and contribute to.
22+
23+
## Context
24+
25+
* InnerSource is practiced across multiple teams, business units, or repositories.
26+
* Teams retain ownership of their repositories and contribution process.
27+
* Contributors need clear signals for how to use, discuss, and contribute to projects.
28+
* The organisation has shared expectations for InnerSource project hygiene.
29+
* An InnerSource Portal, source code inventory, or repository catalogue may already exist.
30+
* GitHub Actions, GitHub APIs, or similar automation tooling is available.
31+
32+
## Forces
33+
34+
* **Autonomy vs consistency:** Teams need local ownership, but contributors need predictable project signals.
35+
* **Contributor confidence:** Missing documentation, stale ownership, or unclear communication channels discourage contributions.
36+
* **Scale:** Manual InnerSource readiness reviews fail once repository count grows.
37+
* **Signal quality:** Noisy or overly generic findings will be ignored.
38+
* **Valid variation:** Different governance levels or project maturity stages may require different readiness expectations.
39+
* **Infrastructure strain:** Large audits can consume API rate limits, runner capacity, logs, and team attention.
40+
* **Control-plane security:** The governance repository becomes important infrastructure because tampering with policies, exceptions, inventory, or workflows can hide readiness gaps across many repositories.
41+
42+
## Solution
43+
44+
Create a **central InnerSource governance repository** that defines contributor-readiness expectations as policy-as-code and runs scheduled audits against repositories in scope. Treat it as an internal product with owners, review rules, actionable reports, and a practical exception process.
45+
46+
The governance repository should contain:
47+
48+
```text
49+
innersource-governance/
50+
policies/
51+
default/
52+
base-documentation.yml
53+
contribution-process.yml
54+
communication.yml
55+
discoverability.yml
56+
shared-ownership/
57+
codeowners.yml
58+
maintainer-model.yml
59+
repository-inventory.yml
60+
exceptions.yml
61+
audit/
62+
audit.py
63+
.github/
64+
workflows/
65+
readiness-audit.yml
66+
```
67+
68+
### InnerSource Policies
69+
70+
Store InnerSource readiness expectations in `policies/`. Use a small number of profiles that match your organisation's InnerSource operating models, such as `default`, `contributions-welcome`, or `shared-ownership`.
71+
72+
Checks can include:
73+
74+
* `README.md` with project purpose, usage, and getting-started guidance,
75+
* `CONTRIBUTING.md` with contribution process and review expectations,
76+
* `CODEOWNERS` or documented maintainer ownership,
77+
* issue and pull request templates,
78+
* documented communication channels,
79+
* support or maintainer contact information,
80+
* license or internal sharing guidance,
81+
* repository description, topics, and discoverability metadata,
82+
* contribution labels such as `good first issue` or `help wanted`, and
83+
* InnerSource Portal badge or registration metadata.
84+
85+
Security and repository configuration checks, such as branch protection or workflow permissions, can be included when they directly support trusted collaboration. Keep the focus on making repositories safer and easier to contribute to.
86+
87+
### Repository Inventory
88+
89+
Maintain an inventory of repositories covered by the audit. This can live in the governance repository or be imported from an InnerSource Portal or source code inventory.
90+
91+
```yaml
92+
repositories:
93+
- name: payments-api
94+
owner: payments-platform-team
95+
profile: contributions-welcome
96+
lifecycle: active
97+
portal_slug: payments-api
98+
```
99+
100+
Each repository should have an owner, lifecycle state, and assigned InnerSource profile. This gives every finding a clear owner and prevents one generic checklist from being applied to every project.
101+
102+
### Exception Registry
103+
104+
Record approved deviations from the readiness baseline in `exceptions.yml`. Each exception should have an owner, reason, and expiry or review date.
105+
106+
```yaml
107+
exceptions:
108+
- repository: payments-api
109+
policy: issue_templates_required
110+
reason: Team is migrating from an external tracker this quarter.
111+
owner: payments-platform-team
112+
expires: 2026-12-31
113+
```
114+
115+
Exceptions keep governance practical, but they should be visible in reports. Avoid broad or non-expiring exceptions because they hide contributor experience problems.
116+
117+
### Readiness Audit
118+
119+
Use an audit script to inspect each repository and compare it with the assigned InnerSource policy profile. Findings should include the repository, owner, policy, severity, expected state, actual state, exception status, and suggested remediation.
120+
121+
Prioritise checks that immediately affect contributor success:
122+
123+
* missing or incomplete base documentation,
124+
* missing contribution process,
125+
* unclear ownership or maintainer contact,
126+
* undocumented communication channel,
127+
* missing issue or pull request templates,
128+
* stale portal metadata or missing discoverability tags,
129+
* missing labels for newcomer-friendly work, and
130+
* repository settings that make contribution review unsafe or unclear.
131+
132+
Design the audit to be incremental and rate-aware. Store the last known state and re-check only repositories that changed where possible. Use conditional requests such as `ETag` / `If-None-Match`, cache expensive checks like repository metadata, branch names, workflow files, and CODEOWNERS, and use GraphQL batching carefully for bulk metadata. Stagger scan frequency by project importance: active InnerSource projects nightly, candidate projects every few days, and archived or sandbox repositories weekly or monthly.
133+
134+
### Reporting and Remediation
135+
136+
Run the audit on a schedule and publish a digest report. Start with visibility-only reporting before introducing automated remediation.
137+
138+
```yaml
139+
on:
140+
schedule:
141+
- cron: "0 2 * * *"
142+
```
143+
144+
Reports should help project owners improve contributor experience, not rank or shame teams. For each finding, include clear remediation guidance or links to templates. If automated remediation is later added, use reviewable pull requests for straightforward fixes such as adding a missing template file.
145+
146+
Track metrics that show whether InnerSource participation is becoming easier:
147+
148+
* percentage of repositories covered,
149+
* percentage of repositories passing readiness checks,
150+
* open findings by severity,
151+
* mean time to remediate contributor-blocking gaps,
152+
* active and expired exceptions,
153+
* false positives and repeated findings,
154+
* audit runtime, API usage, and runner minutes.
155+
156+
### Govern the Governance Repository
157+
158+
The governance repository should itself follow strong InnerSource practices. Policy changes should happen through pull requests, with visible discussion and review by the InnerSource Program Office, platform team, security partners, and affected project owners where appropriate.
159+
160+
Protect the repository more strictly than ordinary project repositories. Require branch protection, mandatory reviews, CODEOWNERS approval for `policies/`, `exceptions.yml`, inventory, audit code, and workflows, and signed or verified changes for sensitive files.
161+
162+
Use least-privilege credentials. Separate read-only audit credentials from any remediation credentials. Log and alert on changes to policies, exceptions, inventory, workflows, and credentials. Periodically audit the governance repository through an independent check.
163+
164+
## Resulting Context
165+
166+
* Contributors can quickly tell whether a repository is ready for InnerSource participation.
167+
* Project owners receive actionable guidance for improving documentation, ownership, communication, and discoverability.
168+
* InnerSource expectations are transparent, version-controlled, and open to contribution.
169+
* Exceptions are explicit, time-bound, and visible.
170+
* InnerSource Portal and inventory data become more reliable.
171+
* Audit cost and infrastructure load are managed through incremental, staggered scans.
172+
* Leadership gains visibility into InnerSource health without micromanaging repository owners.
173+
174+
## Use This Pattern When
175+
176+
* You have many InnerSource repositories owned by different teams.
177+
* Contributors struggle to identify how to use or contribute to projects.
178+
* InnerSource Portal quality depends on repository metadata and project hygiene.
179+
* Manual readiness checks are too slow or incomplete.
180+
* You want transparent policy-as-code instead of undocumented central checks.
181+
* The cost of poor contributor experience is higher than the cost of maintaining the governance process.
182+
183+
## Don’t Use This Pattern When
184+
185+
* Only a few InnerSource repositories exist and manual support is enough.
186+
* You need hard enforcement at merge time rather than periodic guidance.
187+
* You cannot maintain repository ownership or lifecycle metadata.
188+
* You cannot protect the governance repository and its credentials appropriately.
189+
* Most projects require unique contribution models that do not fit a small set of profiles.
190+
191+
## Known Instances
192+
193+
TBD
194+
195+
## Status
196+
197+
* Initial
198+
199+
## Authors
200+
201+
* [Amburi Roy](https://www.linkedin.com/in/amburi/)
202+
203+
## Related Patterns
204+
205+
* [Standard Base Documentation](../2-structured/base-documentation.md) — defines the contributor-facing files that an InnerSource readiness linter can check.
206+
* [Assisted Compliance](assisted_compliance.md) — complements audit findings by helping repository owners add missing contribution guidance.
207+
* [Communication Tooling](../2-structured/communication-tooling.md) — describes the communication channels that readiness checks can require repositories to document.
208+
* [Issue Tracker Use Cases](../2-structured/issue-tracker.md) — supports checking that issue templates and public planning practices are in place.
209+
* [Unified Source Code Inventory](source-code-inventory.md) — can provide the repository inventory used as audit scope.
210+
* [Explicit Governance Levels](../2-structured/governance-levels.md) — can provide policy profiles for different InnerSource operating models.
211+
* [InnerSource Portal - Hygiene](innersource-portal-hygiene.md) — overlaps with readiness checks for portal badges, metadata, and active projects.
212+
* [Include Product Owners](include-product-owners.md) — helps with stewardship of the governance repository.
213+
* [Trusted Committer](../2-structured/trusted-committer.md) — supports safe and consistent policy changes.
214+
* [InnerSource Portal](../2-structured/innersource-portal.md) — complements central access to shared organisational knowledge.

0 commit comments

Comments
 (0)