Dashboard › publish › Distillation
1df3370d-59ed-433d-b848-34e8be520cf7["lore_tm_v1_Wc8EpD0DQpMA1PXApQkwQKKuuLhyrJ3bs0HhUa8cPWY","lore_tm_v1_ZTTLF8EQb3mwPg9v-fJsLIFCNWA66ifzVY7vqR_VK90","lore_tm_v1_LpP53S8x55g1cyTGEGB9m4SofTK3vnEgRuiNmfj6ZKs","lore_tm_v1_VAZ_UzgZqX_1N7UsktV0bqNwmNjs5TNotLMpaK9r1rE","lore_tm_v1_IyEvvj79FX0dXkSl8p4pOy18yBDh86pEnFKQmSHsTaE","lore_tm_v1_cXlwF6aJloK-0sLvBldaSxXji35NNvJbJUbluJA0kUQ","lore_tm_v1_Z3KSlvgYOjhJG76j7Cldde9-o9oWcPBg2eh9mEzTFK4","lore_tm_v1_1WMP6xSxtxqOzKESM4mDF5Mb7GoOPCLqT7kGcndhudo","lore_tm_v1_z8qeJU3Tm72ScYBixQZOSoL-KWKokUSTqIMlaqh2-ic","lore_tm_v1_JCl_YoQyWyLZWtoRkBqlX1kLCx6Xe0-efjsu4R0WrO0","lore_tm_v1_lo5Lsiqsd7rrR7vBzyFodDKX86i2PmY6XozL9R7UCNI"]
2026-09-10
requiresMinVersion(requiredVersion) parses configured and required versions and returns versionGreaterOrEqualThan(configuredMinVersion, required); getVersioningPolicy() uses configured versioning.policy, otherwise selects "auto" when requiresMinVersion(AUTO_VERSION_MIN_VERSION) is true and "manual" otherwise.getGlobalGitHubConfig(clearCache = false) at lines 232496-232525: it uses _globalGitHubConfigCache unless clearing; cached null throws ConfigurationError("GitHub configuration not found in the config file and cannot be determined from Git"); it first reads getConfiguration(clearCache).github, then derives { owner: remoteUrl.owner, repo: remoteUrl.name } from the origin remote or first Git remote when remoteUrl?.source === "github.com"; Git-remote errors are logged as warnings; the result is frozen and cached.getGitTagPrefix() at lines 232527-232539: it filters configuration targets to target.name === "github", uses the first targetβs tagPrefix or "", and warns when GitHub targets have conflicting prefixes, recommending a separate .craft.yml per independently versioned monorepo product.UpmTarget code at lines 160214-160270: ARTIFACT_NAME = "package-release.zip"; its internal GitHubTarget receives { name: "github", tagPrefix: config3.tagPrefix, owner: config3.releaseRepoOwner, repo: config3.releaseRepoName }; fetchArtifact(revision) reports errors when no release artifact exists or when "package-release.zip" is absent; publish(version2, revision) starts by fetching that artifact./home/byk/Code/getsentry/publish/src/modules/publish-issue-title.peggy, an 86-line PEG grammar./home/byk/Code/getsentry/publish/src/modules/publish-issue-title.peggy, PublishIssueTitle accepts "publish: ", an optional "getsentry/", Repository, optional Path, "@", and Version, then returns { repo, path: path || "", version }; repository/path characters are [A-Za-z0-9_.-], and version characters are [A-Za-z0-9_.+-]./home/byk/Code/getsentry/publish/src/modules/publish-issue-title.peggy, comments state that a title path suffix is syntactic only and that the controller resolves the complete suffix as a workspace after checking out the CI-approved revision./home/byk/Code/getsentry/publish/src/modules/publish-issue-title.peggy, ReleaseRevision parses the request header at the beginning of the issue body; RequestHeader requires Requested by: @β¦, Merge target: β¦, Quick links:, a View changes link, and a https://github.com/getsentry/<repo>/commit/<revision>/checks link./home/byk/Code/getsentry/publish/src/modules/publish-issue-title.peggy, CheckRunsRevision accepts lowercase hexadecimal only and semantically requires exactly 40 characters, returning { value, start: range.start.offset, end: range.end.offset }; CheckRunsLinkCount counts exact "- [View check runs](" entries to protect against appended decoy links./home/byk/Code/getsentry/publish/src/modules/publish-issue-title.peggy, MergeTarget accepts "(default)" or [A-Za-z0-9_./-]+; newlines may be "\r\n" or "\n"; LinkDestination excludes newlines and ).CRAFT_MERGE_TARGET or CRAFT_WORKSPACE; it found CRAFT_DRY_RUN only in a TODO saying to deprecate DRY_RUN in favor of CRAFT_DRY_RUN."no-input" uses coerce: envToBool2, defaults to import_is_ci2.default, is global, and suppresses prompts; "dry-run" uses coerce: envToBool2, defaults to process.env.DRY_RUN, is global, and means no file writes, commits, pushes, or API mutations.yargs_default().env("CRAFT"), so CLI options can be populated from CRAFT_-prefixed environment variables..option("workspace":, 0 for argv.workspace:, and 0 for process.env.CRAFT_PUBLISH_STATE_GITHUB_REPO:.workspace list, CRAFT_WORKSPACE, selected workspace, Unknown workspace, workspace config, and Workspace name.expandWorkspaceTargets(targets) at lines 232646-232662: isExpandableTarget(targetClass) requires a function with a callable static expand; root directory is getConfigFileDir() || process.cwd(); expandable targets call await targetClass.expand(target, rootDir) and spread results, while other targets pass through unchanged."all" and "none" cannot be specified alongside another target; configured targets are transformed by await expandWorkspaceTargets(config3.targets || []); getGlobalGitHubConfig() is attempted for publish-state namespacing with errors swallowed; the state path comes from getPublishStatePath(newVersion, publishStateGithubConfig); legacy .craft-publish-${newVersion}.json files are detected but no longer read for security reasons.craft targets behavior at lines 242309-242316: command ["targets"] is described as "List defined targets as JSON array", expands workspace targets, filters them against getAllTargetNames(), maps with BaseTarget.getId, and prints formatJson(allowedTargetNames).craft prepare [NEW-VERSION] with aliases p, prerelease, prepublish, prepare, release; 2. craft publish NEW-VERSION with aliases pp, publish; 3. craft targets; 4. craft config; 5. craft artifacts <command> with aliases a, artifact; 6. craft changelog.--no-input defaulting to false, --dry-run, --log-level defaulting to "Info" with choices "Fatal", "Error", "Warn", "Log", "Info", "Success", "Debug", "Trace", "Silent", "Verbose", -v/--version, and -h/--help.workspace list failed with Unknown commands: workspace, list./home/byk/Code/getsentry/publish/src/modules/__tests__/details-from-context.js, a 279-line Vitest test file importing detailsFromContext and parsePublishTitle from ../details-from-context.js./home/byk/Code/getsentry/publish/src/modules/__tests__/details-from-context.js tests canonical issue parsing: issue 223, title publish: getsentry/sentry@21.3.1, requester @BYK, merge target custom-branch, and selected targets produce { dry_run: "", merge_target: "custom-branch", path: ".", repo: "sentry", targets: ["github", "npm[@sentry/node]", "docker[latest]"], version: "21.3.1" }./home/byk/Code/getsentry/publish/src/modules/__tests__/details-from-context.js verifies version 4.2.6+sentry1 parses from publish: getsentry/sentry-forked-django-stubs@4.2.6+sentry1./home/byk/Code/getsentry/publish/src/modules/__tests__/details-from-context.js verifies qualified title publish: getsentry/sentry-javascript/packages/core@10.0.0 parses as { path: "/packages/core", repo: "sentry-javascript", version: "10.0.0" }, while legacy publish: sentry-javascript@10.0.0 parses as { path: "", repo: "sentry-javascript", version: "10.0.0" }./home/byk/Code/getsentry/publish/src/modules/__tests__/details-from-context.js verifies Merge target: (default) is normalized to merge_target: ""; the expected result includes path: ".", repo: "sentry", targets ["github", "docker[latest]"], and version "21.3.1"./home/byk/Code/getsentry/publish/src/modules/__tests__/details-from-context.js verifies an appended Merge target: decoy does not override canonical-header value "custom-branch"./home/byk/Code/getsentry/publish/src/modules/__tests__/details-from-context.js verifies title publish: getsentry/toolkit/packages/cli@1.2.3 yields { repo: "toolkit", version: "1.2.3", path: "./packages/cli" }./home/byk/Code/getsentry/publish/src/modules/__tests__/details-from-context.js rejects publish: getsentry/toolkit @1.2.3 with "Invalid publish issue title"./home/byk/Code/getsentry/publish/src/modules/__tests__/details-from-context.js rejects path traversal publish: getsentry/toolkit/../other@1.2.3 and current-directory path publish: getsentry/toolkit/./other@1.2.3 with "Invalid publish issue path"./home/byk/Code/getsentry/publish/src/modules/__tests__/details-from-context.js rejects unsafe checkout repository identities "-toolkit", ".", "..", and "__proto__" with "Invalid publish issue repository"./home/byk/Code/getsentry/publish/src/modules/__tests__/details-from-context.js rejects release versions "--config" and "1.2" with "Invalid publish issue version", and rejects path-bearing version syntax in publish: getsentry/toolkit@1.2.3/other with "Invalid publish issue title"./home/byk/Code/getsentry/publish/src/modules/__tests__/details-from-context.js verifies missing issue payload via detailsFromContext({ context: {} }) throws "Issue context is not defined"./home/byk/Code/getsentry/publish/src/publish/__tests__/publish-workflow.js, a 31-line Vitest file reading .github/workflows/publish.yml./home/byk/Code/getsentry/publish/src/publish/__tests__/publish-workflow.js verifies approval/publication are bound to the triggering issue snapshot by requiring node src/publish/request-digest-from-event.js and exactly 4 occurrences of EXPECTED_REQUEST_DIGEST: ${{ steps.request-digest.outputs.request_digest }}./home/byk/Code/getsentry/publish/src/publish/__tests__/publish-workflow.js verifies "Revalidate approval attestation" occurs after "Set targets" and before "Publish using Craft", with REQUIRE_CI_READY_ATTESTATION: "true" present from that fence onward./home/byk/Code/getsentry/publish/src/publish/__tests__/publish-workflow.js verifies Craft is pinned immutably using a workflow reference matching uses: docker://getsentry/craft@sha256:[a-f0-9]{64}.