Repository navigation
feat(changelog): Let workspaces own or exclude unowned paths - #921
Merged
Merged
Conversation
Add changelog.unownedPaths (include, exclude, own) so a root application can claim files outside every workspace, or a package can ignore them. Start a workspace's first changelog at the commit that added it to .craft.yml instead of the full repository history, and log how many commits Craft reads when no previous tag exists. Co-Authored-By: BYK <burak.kaya@sentry.io>
Contributor
|
BYK
approved these changes
Oct 22, 2026
This was referenced Oct 22, 2026
BYK
added a commit
that referenced
this pull request
Oct 22, 2026
`changelog.includePaths` and `changelog.unownedPaths` only change which release workspace owns a path. A configuration without `workspaces` has no ownership to change, so Craft accepted both settings and silently ignored them. That's how the objectstore case behind #920 started: `includePaths` in `clients/.craft.yml` looked like it should work, but did nothing. Validation now rejects either setting in the top-level `changelog` when no `workspaces` are defined: ``` changelog.includePaths: Only release workspaces support this setting. Define "workspaces" to use it. ``` When `workspaces` exist, top-level values are still allowed because workspaces inherit them. This is a breaking change for configs that set these keys without workspaces. A GitHub code search for `includePaths` in `.craft.yml` finds only getsentry/toolkit, which uses it inside a workspace. Repos like objectstore that need "only these directories" can define a workspace with `unownedPaths: exclude` plus `includePaths` (#921). This replaces the approach in #920. <!-- junior-request-attribution:start --> via **BYK**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:local%3Aweb%3A5fa09a4fbd66e4ebf0b123c1 --> -- [View Junior Session in Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A5fa09a4fbd66e4ebf0b123c1/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <burak.kaya@sentry.io>
8 tasks done
BYK
added a commit
to getsentry/sentry
that referenced
this pull request
Oct 22, 2026
Since the move to Craft release workspaces (#126643), Craft treats every pnpm workspace directory as owned by something other than the `sentry` workspace. That includes `static/app`, `static/gsApp`, `static/gsAdmin`, `api-docs` and `tests/js`. Commits that only touch those directories are dropped from the automatic `CHANGES` changelog. Between `scraps@0.1.0` and the scraps 0.2.0 release base, that's 451 of 1,232 commits. This lists those directories under `changelog.includePaths` for the `sentry` workspace. With this config, 1,227 of the 1,232 commits are kept. The 5 still excluded only touch `static/packages/scraps` or its lint plugin. `includePaths` has been supported since Craft 2.32.0, below our `minVersion` of 2.33.1. The scraps and icons changelogs still pick up backend commits, because files outside every workspace (`src/`, `tests/`, …) count as shared. getsentry/craft#921 adds `changelog.unownedPaths: own` so the `sentry` workspace can claim those files. Setting it here will be a follow-up once that ships in a Craft release. <!-- junior-request-attribution:start --> via **BYK**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:local%3Aweb%3A5fa09a4fbd66e4ebf0b123c1 --> -- [View Junior Session in Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A5fa09a4fbd66e4ebf0b123c1/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <burak.kaya@sentry.io>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Workspace changelogs treat every file outside all workspaces as shared, so it lands in every workspace's changelog. That breaks repos where an application lives at the root next to independently released packages. In getsentry/sentry,
@sentry/scraps@0.2.0picked up 785 commits sincescraps@0.1.0; only 21 touchedstatic/packages/scraps. The rest were backend changes undersrc/andtests/.This adds
changelog.unownedPaths:include(default): current behavior.exclude: this workspace ignores files outside every workspace.own: this workspace claims them, and every other workspace ignores them. Only one workspace may setown. Workspaces without their ownchangelogblock inherit the top-level one, so a top-levelownthat reaches several workspaces is rejected.First releases
A workspace's first release has no matching tag, so Craft read the whole repository history. When sentry switched scraps from
scraps-v*toscraps@*tags,craft prepareran through about 75k commits and ~1,500 GraphQL batches, and the run was cancelled after 34 minutes.Now, when no previous tag exists and a workspace is selected, Craft walks back through
.craft.ymlhistory to the commit that first defined the workspace's key and starts there. If that commit has no parent, Craft keeps the full history. Craft now logs how many commits it reads: at info level when it found a starting commit, and as a warning when it falls back to the full history. Pushing a tag with the workspace's prefix still overrides this.Against a sentry checkout at the 0.2.0 release base, a first release of
static/packages/scrapsreads 1,152 commits starting at the commit that added the workspace (getsentry/sentry#126643) and keeps 21 oncesentryowns unowned paths.Relation to #920
#920 handles
includePathswhen Craft runs without workspaces. This PR only changes workspace mode, so the two don't overlap in behavior.excludeis the workspace option that #920's open question describes. Both PRs edit the top ofgetChangesSince, so whichever lands second needs a small rebase.via BYK.
--
View Junior Session in Sentry