Dashboard › craft › Distillation
790a4978-30df-472d-9d13-cec325a2d5e2["lore_tm_v1_46F4BsoLJ5w7vR_Xsv7QKFLa4bAxnVBzQDcIz16_AUM","lore_tm_v1_UAsgWsqwegQb0LbY_N12HpGCLucQyLWZB_WqFWWKPIc","lore_tm_v1_wmBZlPlJ98GbDggX0Po14UenAO5HBXSCFYdwvWumxHU","lore_tm_v1_TmVwVt_DWoo8Z3kfpIdYKjBRhHX2c2NajTBODr2JQeI","lore_tm_v1_SnHBXqfhzRaQKxOSI9jPKIhfumgI8VwcRA9fmE1Docg","lore_tm_v1_0eGSJjKgdBtzp-z5vCLZx-03tFLIItO4c2JEL0AoJdE"]
Date: Aug 27, 2026
pnpm for package management; never use npm or yarn.pnpm install --frozen-lockfile.src/__mocks__/ test mocks; src/__tests__/ *.test.ts tests; src/artifact_providers/, src/commands/, src/schemas/, src/status_providers/, src/targets/, src/types/, src/utils/; root source files src/config.ts, src/index.ts, src/logger.ts; bundled esbuild executable is dist/craft.action.yml in /home/byk/Code/getsentry/craft-workspace-action-propagation/ supports a named workspace input described as “Named Craft release workspace to prepare and publish,” validates it in a “Validate workspace” step, and passes it to Craft as --workspace=$WORKSPACE for relevant commands.publish: ${GITHUB_REPOSITORY}${SUBDIRECTORY}${workspace_title}${version_separator}${RESOLVED_VERSION}, where a nonempty workspace is JSON-encoded with jq -Rn --arg workspace "$WORKSPACE" '$workspace' and rendered as [workspace: ${workspace_json}]; it lists open issues with gh -R "$PUBLISH_REPO" issue list --json title,url,number,body, matches exact titles, preserves checked target states when rebuilding/editing an existing issue, and creates an issue if no matching issue exists.E2BIG; because GitHub issue bodies are limited to approximately 65,536 characters, it truncates at MAX_CHANGELOG_CHARS and appends \n\n---\n*Changelog truncated for issue body.*.src/schemas/project_config.ts, WorkspaceSchema defines a named independently-versioned release unit. It shares optional release fields github, targets, preReleaseCommand, postReleaseCommand, releaseBranchPrefix, changelog, changelogPolicy, requireNames, statusProvider, artifactProvider, versioning, and noMerge; workspace github is GitHubGlobalConfigSchema.partial().optional() so it can override only projectPath, owner, or repo while inheriting the rest.CraftProjectConfigSchema in src/schemas/project_config.ts accepts optional minVersion matching /^\d+\.\d+\.\d+.*$/ and optional workspaces: z.record(z.string(), WorkspaceSchema). Documentation specifies that when workspaces exists, a run must select one using --workspace <name> or CRAFT_WORKSPACE; selected workspace fields override top-level fields, while absence of workspaces retains backward-compatible single implicit top-level release-unit behavior.src/schemas/project_config.ts distinguishes named Craft release-unit workspaces from an npm target’s workspaces: true: the former are independently versioned release units, while the latter discovers and publishes npm packages within one target at the same version.WORKSPACES_MIN_VERSION = '2.29.0'; configuration validation requires minVersion >= 2.29.0 to use workspaces.minVersion side.publish-workspace-acceptance/src/modules/details-from-context.js parses publish titles with titleParser: ^publish: (?:getsentry\/)?(?<repo>[A-Za-z0-9_.-]+)(?<path>\/[\w./-]+)?(?: \[workspace: (?<workspace>"(?:[^"\\]|\\.)*")\] )?@(?<version>[\w.+-]+)$; it supports an optional JSON-quoted workspace segment, parses it via JSON.parse, and returns it only when nonempty.detailsFromContext() rejects malformed workspace JSON with Invalid publish workspace JSON in title: '<title>'; rejects empty workspace names or names containing Unicode control (\p{Cc}), format (\p{Cf}), line-separator (\p{Zl}), or paragraph-separator (\p{Zp}) characters; rejects absent issue context and title mismatches; and rejects issue paths whose "." + path segments contain ...detailsFromContext() derives dry_run as "1" when an issue label is named "dry-run" (otherwise ""), derives optional merge_target from ^Merge target: (?<merge_target>[\w.\-/]+)$ in the issue body, extracts checked target IDs from the matched Targets section, and returns repo, path, version, dry_run, merge_target, targets, plus optional workspace.publish-workspace-acceptance/src/modules/update-issue.js uses trimEnd() (not deprecated trimRight()) when transforming the Targets section. transformIssueBody(craftState, issueBody) updates declared target checkboxes from craftState.published[targetId], tracks declared IDs in new Set(), appends any target keys present in craftState.published but missing from the issue body, and formats published targets as - [x] <target> and unpublished targets as - [ ] <target>.updateTargets() in src/modules/update-issue.js returns without action if stateFilePath is absent or fs.existsSync(stateFilePath) is false; otherwise it concurrently gets the GitHub issue and reads/parses the Craft state JSON using Promise.all, transforms the body, and updates the issue. updateIssue() concurrently calls updateTargets() using process.env.CRAFT_STATE_FILE_PATH and removes the "accepted" label from the issue.