Dashboard › publish › Distillation
5fd7d153-62f6-47ef-a13c-e659188fbfb2["lore_tm_v1_J2yx2HQ47ItCUDTchsAxxXxfK061aTKZIZlWxq4fLyI","lore_tm_v1_YTpuGhoCHw1FPlhhtggzBP41ujXWcnZzdx8qWLLsGpc","lore_tm_v1_olmOc7Lo52OH7nfTRSzai7l7mVTt4jNPG-K36hAENuY","lore_tm_v1_dknclni7Ao8o6uez8bMSMb7TFSkhVfBxmX4mn9oL4Bo","lore_tm_v1_OU50bOYBI8p_Qju87Ba7FRga4BewATrBctdUsGBEA28","lore_tm_v1_gO2SrjdT29hg_HsfywdXW5Wt2b6zfJY7AWZ3Y3bI17M","lore_tm_v1_nB3EDF7L8axEAsTLRaPRZfLR9GtsP6g3okybXHwCtCg","lore_tm_v1_FlOWnM_aq4xJynXE4rUNaV33ILXSzf3Fqa0dQPs34lU","lore_tm_v1_GKPYBNBofjhX3zaggZbaxuya-3uDBjncSTT_g2418Hs","lore_tm_v1_CgJw9NzR9lgBFXISL8q1GzOoW0FV6FyX3wuYfR0GuG8","lore_tm_v1_VEzk715qOVjXqXLBrC8ALNfB4o9WFZz8upsxxnjZF04","lore_tm_v1_YOGXyBGExrwmgLrh6ZTFWHYMuUnLgv7Q58y-2v9m-TI","lore_tm_v1_x6bRzWsFkNq-M5WI5uKTGQmADJZpqeBicd6c9ugRiqk","lore_tm_v1_zIxEDUZKURZXWr_B5Sujjk0sy3P8Fxv0doV2tvjn8rA"]
Date: Sep 10, 2026
/home/byk/Code/getsentry/publish/src/modules/details-from-context.js is 103 lines and exports detailsFromContext, TARGETS_SECTION_PARSER_REGEX, TARGETS_PARSER_REGEX, CHECKED_TARGETS_PARSER_REGEX, and parsePublishTitle.details-from-context.js defines TARGETS_SECTION_PARSER_REGEX = /^(?!### Targets$\s)(?: *- \[[ xX]\] \S+\s*$(?:\r?\n)?)+/m, TARGETS_PARSER_REGEX = /^\s*- \[[ x]\] (\S+)/gim, and CHECKED_TARGETS_PARSER_REGEX = /^\s*- \[x\] (\S+)/gim.parsePublishTitle(title) in details-from-context.js calls parsePublishIssueTitle(title), constructs "." + titleDetails.path, and returns null on parser failure or when isPublishRepository(titleDetails.repo), isReleaseVersion(titleDetails.version), or isPublishPath(path) fails; otherwise it returns titleDetails.detailsFromContext({ context }) throws Issue context is not defined unless context.payload.issue exists; title parse failures become Invalid publish issue title: '${context.payload.issue.title}', while invalid repository, version, and path values produce corresponding field-specific errors.detailsFromContext() sets dry_run to "1" when any issue label has name === "dry-run" and to "" otherwise; obtains mergeTarget via getReleaseRevisionDetails({ issueBody: context.payload.issue.body || "", repo: titleDetails.repo }); extracts checked target IDs from the matched Targets section; and returns ...titleDetails, dry_run, merge_target ("" when mergeTarget === "(default)"), path, and targets./home/byk/Code/getsentry/publish/src/modules/post-workflow-details.js is 19 lines. postWorkflowDetails({ context, octokit }) gets the workflow run with octokit.rest.actions.getWorkflowRun({ ...publishRepo, run_id }) and creates an issue comment with body Publishing: [run#${run_id}](${workflowInfo.html_url})./home/byk/Code/getsentry/publish/src/modules/process-end-state.js is 123 lines and exports processEndState.processEndState({ context, octokit, inputs = {}, status }) validates status before terminal changes by calling sentryInfoFromDetails({ status, repo }); for status === "success" it closes the issue via octokit.rest.issues.update; it then retrieves workflow-run information, calls postIssueComment({ octokit, details }), and calls reportSession({ details, inputs }).githubIssueComment() in process-end-state.js maps failure to Failed to publish. plus run logs ending ?check_suite_focus=true#step:8 and a URL-encoded branch-deletion link; maps cancelled to Publish workflow cancelled. with the same log/branch-help structure; maps success to Published successfully: [run#${run_id}](${workflowInfo.html_url}); and otherwise throws Unknown status: '${status}'.reportSession() in process-end-state.js initializes Sentry with dsn: process.env.SENTRY_DSN and release: \${details.repo}@${details.version}`, sets tag "repository", sets "release"context containingissue_numberandinputs, captures the mapped message/severity, starts and ends a session with the mapped status, and awaits Sentry.close()`.sentryInfoFromDetails() maps statuses as follows: failure → message Release failed: ${repo}, severity "error", session status "crashed"; cancelled → Release cancelled: ${repo}, severity "warn", status "crashed"; success → Release succeeded: ${repo}, severity "info", status "ok"; unknown values throw Unknown status: '${status}'./home/byk/Code/getsentry/publish/src/modules/publish-location.js is 49 lines and exports resolvePublishLocation and isPublishPath.resolvePublishLocation({ path, workspaceNames }) throws Invalid publish path. for an invalid path and Craft workspace discovery returned an invalid workspace list. if any workspace name is invalid; "." returns { path }; a path whose path.slice(2) exactly matches a workspace returns { path: ".", workspace }; otherwise it returns { path }.isPublishPath(path) accepts only strings equal to "." or beginning "./" whose slash-separated remainder consists entirely of safe segments. isWorkspaceName(name) applies the same segment validation to workspace names.isSafeWorkspaceSegment(segment) requires /^[A-Za-z0-9_.-]+$/, rejects ".", "..", and "__proto__", and rejects segments starting with "-"./home/byk/Code/getsentry/publish/src/modules/release-revision.js is 55 lines and exports getReleaseRevision, getReleaseRevisionDetails, and updateReleaseRevision.isRevision(revision) in release-revision.js requires exactly 40 lowercase hexadecimal characters via /^[0-9a-f]{40}$/.getReleaseRevisionDetails({ issueBody, repo }) requires parse(issueBody, { startRule: "CheckRunsLinkCount" }) === 1, otherwise throwing Expected exactly one View check runs link in Quick links for getsentry/${repo}.; it parses ReleaseRevision, converting parse failure or a mismatched details.repo into Expected a View check runs link for getsentry/${repo} in the publish issue body..getReleaseRevision({ issueBody, repo }) returns .revision.value from getReleaseRevisionDetails(). updateReleaseRevision({ issueBody, repo, revision }) rejects invalid SHAs with Release revision must be a lowercase 40-character SHA. and replaces only the substring between currentRevision.start and currentRevision.end./home/byk/Code/getsentry/publish/src/publish/discover-location.js is 85 lines and exports discoverLocation and getWorkspaceNames.discover-location.js pins CRAFT_IMAGE to getsentry/craft@sha256:9a4a5d5efa44a00c2215078ead39800d4aaa5a97908b94f45a64d7d506d6e14b.getWorkspaceNames({ repositoryDirectory, exists = existsSync, execFile = execFileSync }) returns [] when .craft.yml does not exist; otherwise it synchronously invokes docker run --rm --volume ${path.resolve(repositoryDirectory)}:/github/workspace/__repo__ --workdir /github/workspace/__repo__ ${CRAFT_IMAGE} workspace list with { encoding: "utf8" }.getWorkspaceNames() JSON-parses Craft output and throws Craft workspace discovery returned an invalid workspace list. if parsing fails or the result is not an array.discoverLocation({ input, repositoryDirectory, exists, execFile }) passes input.path and discovered workspace names to resolvePublishLocation(). main() parses PUBLISH_ARGS || "{}", requires input.path or throws Publish input must define a path., defaults PUBLISH_REPOSITORY_DIRECTORY to "__repo__", and writes the JSON-stringified result to the GitHub Actions output "result"./home/byk/Code/getsentry/publish/src/publish/inputs.js is 11 lines; inputs() calls detailsFromContext({ context: github.context }) and writes the JSON-stringified result to GitHub Actions output "result", and the file invokes inputs() immediately./home/byk/Code/getsentry/publish/src/publish/post-result.js is 31 lines and exports main.post-result.js defaults context to github.context, octokit to github.getOctokit(getGitHubToken()), report to processEndState, and status to process.argv.slice(2)[0]; it parses PUBLISH_ARGS into inputs, warns Could not parse publish inputs; reporting without them on invalid JSON, and calls report({ context, octokit, inputs, status }).post-result.js catches main() failures, logs the error, and sets process.exitCode = 1./home/byk/Code/getsentry/publish/src/publish/post-workflow-details.js is 8 lines; it obtains github.context and github.getOctokit(getGitHubToken()), then calls postWorkflowDetails({ context, octokit })./home/byk/Code/getsentry/publish/src/publish/resolve-ci-poller-input.js is 17 lines. It reads issueBody from the UTF-8 file named by PUBLISH_ISSUE_BODY_FILE when set, otherwise from PUBLISH_ISSUE_BODY || "", and writes JSON from getCiPollerInput() to stdout.resolve-ci-poller-input.js passes labels: JSON.parse(process.env.PUBLISH_ISSUE_LABELS || ""), title: process.env.PUBLISH_TITLE || "", and revision: process.env.PUBLISH_REVISION || "" to getCiPollerInput()./home/byk/Code/getsentry/publish/src/publish/resolve-release-revision.js is 19 lines. resolveReleaseRevision() parses PUBLISH_ARGS || "{}", throws Publish input must define a repository. when repo is absent, and sets GitHub Actions output "revision" from getReleaseRevision({ issueBody: process.env.PUBLISH_ISSUE_BODY || "", repo }); the file invokes the function immediately./home/byk/Code/getsentry/publish/src/publish/update-issue.js is 28 lines and exports main.update-issue.js obtains github.context and github.getOctokit(getGitHubToken()); if PUBLISH_ARGS exists, it parses it into inputs, warning Could not parse publish inputs; skipping target update on failure; it then calls updateIssue({ context, octokit, inputs }).update-issue.js catches main() failures, logs the error, and sets process.exitCode = 1./home/byk/Code/getsentry/publish/src/libs/github.js is 19 lines and exports getGitHubToken(). The function throws No "GITHUB_TOKEN" environment variable found. Please ensure the workflow is configured correctly when GITHUB_TOKEN is absent and otherwise returns process.env.GITHUB_TOKEN./home/byk/Code/getsentry/publish/src/modules/publish-issue-validation.js is 17 lines and exports isPublishRepository and isReleaseVersion.isPublishRepository(name) requires /^[A-Za-z0-9_.-]+$/, rejects ".", "..", and "__proto__", and rejects names starting with "-".isReleaseVersion(version) validates a three-component numeric release version with no leading zeroes except zero itself, plus optional prerelease and build metadata, using /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:-?([0-9a-z-]+(?:\.[0-9a-z-]+)*))?(?:\+([0-9a-z-]+(?:\.[0-9a-z-]+)*))?$/i.