Skip to content

Commit 7186ea4

Browse files
authored
Merge branch 'main' into fix/shaclgen-maxcount-zero
2 parents 3a38968 + c8b9bac commit 7186ea4

3 files changed

Lines changed: 29 additions & 17 deletions

File tree

.github/CODEOWNERS

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
# LinkML CODEOWNERS — DRAFT (see linkml/linkml#3140)
22
#
3-
# Opt-in model: no default (`*`) rule. Paths not listed here have no required
4-
# CODEOWNER and are reviewed normally. Rules only appear where someone has
5-
# explicitly volunteered to steward an area.
3+
# Default model: all paths require core-team approval unless a more specific
4+
# CODEOWNER rule applies. Later rules override earlier ones (last match wins),
5+
# so per-subsystem rules below take precedence over the default for their paths.
66
#
77
# Process for adding rules: docs/maintainers/codeowners.md
8-
# Later rules override earlier ones for matched paths.
8+
9+
# --- Default: require core-team approval everywhere ---
10+
* @linkml/core-team
911

1012
# --- CODEOWNERS and governance docs ---
1113
/.github/CODEOWNERS @linkml/core-team
1214
/docs/maintainers/contributor-hierarchy.md @linkml/core-team
1315
/docs/maintainers/codeowners.md @linkml/core-team
1416
/docs/maintainers/generator-governance.md @linkml/core-team
1517

16-
# --- Per-subsystem ownership (opt-in) ---
18+
# --- Per-subsystem ownership (overrides the default for these paths) ---
1719

1820
# javagen
1921
/docs/generators/java.rst @gouttegd

docs/maintainers/codeowners.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,34 @@ For the underlying GitHub mechanics, see the upstream
99
[CODEOWNERS documentation](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners).
1010
This page only covers how LinkML uses it.
1111

12-
## The LinkML model: opt-in stewardship
12+
## The LinkML model: core-team default with per-area stewardship
1313

14-
LinkML uses an **opt-in** model. The `CODEOWNERS` file contains:
14+
LinkML uses a **default-rule** model. The `CODEOWNERS` file contains:
1515

16-
- **No default (`*`) rule.** Paths that no one has claimed are reviewed
17-
normally, exactly as they were before CODEOWNERS existed. CODEOWNERS does
18-
not create a new approval gate for the rest of the codebase.
16+
- **A default (`*`) rule** requiring `@linkml/core-team` approval on any path
17+
not covered by a more specific rule. This closes the gap where a
18+
write-access holder could merge a PR touching an unclaimed area without any
19+
core-team sign-off. Because GitHub applies the *last* matching rule, the
20+
per-subsystem rules below still take precedence over the default for their
21+
own paths.
1922
- **Per-generator / per-subsystem rules** for specific directories (e.g.
2023
`packages/linkml/src/linkml/generators/pydanticgen/`,
2124
`packages/linkml/src/linkml/generators/yarrrmlgen.py`) where a contributor
22-
has explicitly volunteered to steward the code. The baseline for
23-
identifying candidate stewards per generator is
24-
[Generator and Validator Governance](generator-governance.md), which
25-
records contributor history from `git blame`.
25+
has explicitly volunteered to steward the code. These override the default
26+
for their paths. The baseline for identifying candidate stewards per
27+
generator is [Generator and Validator Governance](generator-governance.md),
28+
which records contributor history from `git blame`.
2629
- **Governance rules**`CODEOWNERS` itself and the governance documents in
2730
`docs/maintainers/` are owned by `@linkml/core-team` to prevent accidental
2831
self-appointments.
2932

33+
```{note}
34+
The default rule only has teeth if the branch protection rule **"Require
35+
review from Code Owners"** is enabled on `main`. Without it, GitHub records
36+
the code-owner requirement but does not block merges. Enabling that setting
37+
requires [admin](contributor-hierarchy.md) access.
38+
```
39+
3040
Implications:
3141

3242
- Being listed in `CODEOWNERS` does **not** grant repository write access.

docs/maintainers/contributor-hierarchy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ Team: [`core-team`](https://github.com/orgs/linkml/teams/core-team)
6767
Capabilities:
6868

6969
- All collaborator capabilities
70-
- Can review and approve PRs anywhere in the monorepo (team write access is
71-
sufficient; CODEOWNER approval is only required for paths explicitly listed
72-
in the [CODEOWNERS](codeowners.md) file)
70+
- Can review and approve PRs anywhere in the monorepo. By default, core-team
71+
approval is what the [CODEOWNERS](codeowners.md) file requires everywhere;
72+
paths with a per-subsystem rule additionally require that area's CODEOWNER
7373
- May invoke the [1-month CODEOWNER fallback](codeowners.md#avoiding-review-bottlenecks-the-1-month-fallback)
7474
to approve stalled PRs in areas with unresponsive CODEOWNERS
7575
- Still subject to branch protection rules (cannot force-push, etc.)

0 commit comments

Comments
 (0)