Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(devex): prepare the owners-yaml 0.3.0 release (#105963)

Julian Bez5a047be43a31
diff --git a/packages/owners-yaml/CHANGELOG.md b/packages/owners-yaml/CHANGELOG.md
index 3e20f11a01fd..af08b6d16ede 100644
--- a/packages/owners-yaml/CHANGELOG.md
+++ b/packages/owners-yaml/CHANGELOG.md
@@ -7,10 +7,11 @@ Notable changes to the `owners-yaml` package. The format follows
`publish-owners-yaml.yml` reads the section matching the tagged version and uses it as
the GitHub Release body, so add the entry here before you cut the tag.
-## Unreleased
+## 0.3.0
### Added
+- `--producer NAME` on `owners resolve` and on `python -m owners_yaml`, and a `producer` argument on `OwnersResolver`. Without it, a team that maps `notifications` per producer was never matched, so every bot fell back to the team's `slack` channel. A name the root file's `producers` list does not declare is an error, because it would silently route to the people channel. SPEC section 7.1 now defines the producer as part of a resolver request.
- An optional `additions` field, at file level and in rules, names the owners of additions below a directory, separate from the owners of the files in it. The format only names them; a consumer decides what counts as an addition and what to do with the list. Unlike `owners`, the owners of additions from every file on the walk and every matching rule add up, and `inherit: false` still cuts them. `SPEC.md` section 3.6 defines it.
- The resolver response carries an `additions` member, and `Resolution` an `additions` field. Consumers that ignore unknown members, as SPEC section 7.4 requires, are unaffected. SPEC section 7.4 requires a consumer to treat a missing member as an empty array.
- `lint` fails on a rule that names a tracked directory without the trailing `/`, such as `docs` for `docs/`. A literal last segment also matches a file of that name, so the slash says which one is meant.
@@ -21,14 +22,9 @@ the GitHub Release body, so add the entry here before you cut the tag.
- Path normalization removes a trailing `/`. `products/new/` and `products/new` now resolve alike; before, the slash put the directory's own ownership file on the walk.
- Every matching rule in a file now applies, and each replaces only the fields it sets. Before, the last matching rule replaced the earlier ones entirely, so a rule that set only `status` dropped the `owners` an earlier rule had set. `SPEC.md` section 3.4 records the amendment.
-## 0.2.1
-
-### Added
-
-- `--producer NAME` on `owners resolve` and on `python -m owners_yaml`, and a `producer` argument on `OwnersResolver`. Without it, a team that maps `notifications` per producer was never matched, so every bot fell back to the team's `slack` channel. A name the root file's `producers` list does not declare is an error, because it would silently route to the people channel. SPEC section 7.1 now defines the producer as part of a resolver request.
-
### Docs
+- The PyPI project page links to the new website, [owners-yaml.posthog.dev](https://owners-yaml.posthog.dev), as its homepage. The README links to it too.
- The `notifications` example in the README and the command next to it now agree: a per-producer mapping needs `--purpose notifications --producer review-bot`. A plain channel string covers all automation.
- The install section warns that the PyPI project named `owners` is a different package. Always write `owners-yaml`.
- "Lint in CI" says what plain `lint` does not check: it does not know which teams exist, `lint --live` asks GitHub through the `gh` CLI, and `who` and `resolve` answer from the parent directory when a file does not parse.
diff --git a/packages/owners-yaml/README.md b/packages/owners-yaml/README.md
index a6b4718520e3..a46a65f75dfd 100644
--- a/packages/owners-yaml/README.md
+++ b/packages/owners-yaml/README.md
@@ -19,6 +19,7 @@ So don't read the files to find an owner. Ask the resolver: `owners who <path>`
GitHub's `CODEOWNERS` can stay in place for required approvals.
The format is defined in [SPEC.md](https://github.com/PostHog/posthog/blob/master/packages/owners-yaml/SPEC.md).
+The website at [owners-yaml.posthog.dev](https://owners-yaml.posthog.dev) walks through setup with commands you can copy.
PostHog's monorepo uses it for about 30 teams.
The same files route review requests, give every agent-opened pull request one accountable owner, and send daily digests, flaky-test reports, and alerts to the right team channel.
@@ -67,7 +68,7 @@ uvx owners-yaml --help # run it once without installing
The package installs two identical commands, `owners` and `owners-yaml`.
An unrelated project on PyPI is named `owners`, so always write `owners-yaml` when you install or run it: `uvx owners` fetches that other package.
After `uv tool install owners-yaml`, the `owners` command on your PATH is this one.
-In CI, pin the version (`owners-yaml==0.2.1`), because a new release can change how paths resolve.
+In CI, pin the version (`owners-yaml==0.3.0`), because a new release can change how paths resolve.
Requirements: Python 3.10 or later, PyYAML, and click.
The commands read tracked files through `git`. Outside a git worktree, pass `--repo-root` and they read the files from disk.
@@ -171,7 +172,7 @@ To list what nobody owns, run `owners unowned`. Paths under `owners: null` are l
### Lint in CI
```console
-$ uvx owners-yaml==0.2.1 lint
+$ uvx owners-yaml==0.3.0 lint
⚠ coverage: 0 of 5 tracked file(s) resolve to unowned
✓ owners.yaml lint passed (1 warning(s))
@@ -208,7 +209,7 @@ Submodules can change between minor releases.
From any language, pipe paths to the JSON entrypoint. `uvx` fetches the package from PyPI, so the machine needs only `uv`:
```bash
-echo "billing/api/invoices.py" | uvx --from owners-yaml==0.2.1 python -m owners_yaml --repo-root path/to/repo
+echo "billing/api/invoices.py" | uvx --from owners-yaml==0.3.0 python -m owners_yaml --repo-root path/to/repo
```
The entrypoint imports only PyYAML. A tool that already has the source can run it with no install: `PYTHONPATH=path/to/packages/owners-yaml python3 -m owners_yaml`.
@@ -300,6 +301,7 @@ Moving an existing CODEOWNERS file into `owners.yaml` files is a one-time migrat
## Project
+- [Website](https://owners-yaml.posthog.dev)
- [Changelog](https://github.com/PostHog/posthog/blob/master/packages/owners-yaml/CHANGELOG.md)
- [Specification](https://github.com/PostHog/posthog/blob/master/packages/owners-yaml/SPEC.md)
- [Issues](https://github.com/PostHog/posthog/issues)
@@ -310,12 +312,12 @@ Run its tests with `uv run --no-project --with pyyaml --with click --with pytest
To release, bump `version` in `pyproject.toml`, add the matching section to `CHANGELOG.md`, merge, then tag `master`:
```bash
-git tag owners-yaml-v0.2.1 && git push origin owners-yaml-v0.2.1
+git tag owners-yaml-v0.3.0 && git push origin owners-yaml-v0.3.0
```
The tag starts [`publish-owners-yaml.yml`](https://github.com/PostHog/posthog/blob/master/.github/workflows/publish-owners-yaml.yml).
It checks that the tag matches the version, builds and tests the wheel, and publishes to PyPI with trusted publishing.
It then creates a GitHub release from the changelog section.
-To retry a failed run, dispatch the workflow on the same tag: `gh workflow run publish-owners-yaml.yml --ref owners-yaml-v0.2.1`.
+To retry a failed run, dispatch the workflow on the same tag: `gh workflow run publish-owners-yaml.yml --ref owners-yaml-v0.3.0`.
MIT licensed.
diff --git a/packages/owners-yaml/pyproject.toml b/packages/owners-yaml/pyproject.toml
index 3c1c6a6078a9..6e38aa9246f9 100644
--- a/packages/owners-yaml/pyproject.toml
+++ b/packages/owners-yaml/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "owners-yaml"
-version = "0.2.1"
+version = "0.3.0"
description = "Code ownership in owners.yaml files next to the code: resolver, linter, and CODEOWNERS export"
readme = "README.md"
license = "MIT"
@@ -43,7 +43,7 @@ owners = "owners_yaml.cli:main"
owners-yaml = "owners_yaml.cli:main"
[project.urls]
-Homepage = "https://github.com/PostHog/posthog"
+Homepage = "https://owners-yaml.posthog.dev"
Documentation = "https://github.com/PostHog/posthog/tree/master/packages/owners-yaml#readme"
Specification = "https://github.com/PostHog/posthog/blob/master/packages/owners-yaml/SPEC.md"
Changelog = "https://github.com/PostHog/posthog/blob/master/packages/owners-yaml/CHANGELOG.md"
diff --git a/uv.lock b/uv.lock
index 890736a07d80..fd6f9d4df8f4 100644
--- a/uv.lock
+++ b/uv.lock
@@ -5272,7 +5272,7 @@ wheels = [
[[package]]
name = "owners-yaml"
-version = "0.2.1"
+version = "0.3.0"
source = { editable = "packages/owners-yaml" }
dependencies = [
{ name = "click" },