Dashboard › publish › Distillation
33a13835-6714-4a79-a390-da45c6e3d0c2["lore_tm_v1_N6CzBtmAmhfZYGb9AiEO40ogLvdpSJkDpZD0s_WjcTI","lore_tm_v1_JWqWkdNKe47iKRhECJ1goinS4ix6R-s-4PfdAbHMjjc","lore_tm_v1_YilQp5hI6LnXC3G9HOmo3PbTY4icdyxITXn440UFUQ8","lore_tm_v1_sDEJJFzVwu8o3etDD1TPQ6UmiPsfJqLp3uP3z8XuijM","lore_tm_v1__csjyMTHdxCeeWUleiGQB20TK9Alv0Kz_2KAr8YAgFA","lore_tm_v1_Jr51_14G5332T9FyJTntmeawSZcMuOuwzPcijoja1KI","lore_tm_v1_tBUmfUnIdIQQu1l-Fe4mXbjyo_OzI6EiXNVTMwyDFII","lore_tm_v1_ad8KvYoMZwOXBN3PJC02-WTnxyStZp5HNN5W-txVe8E"]
Date: Aug 29, 2026
src/publish/update-issue.js loads context, an Octokit client using getGitHubToken(), and inputs from JSON.parse(process.env.PUBLISH_ARGS), then invokes updateIssue({ context, octokit, inputs })..github/workflows/auto-approve.yml is named auto-approve non-sdks; triggers on newly opened issues; has contents: read; and runs auto-approve on ubuntu-latest only when actor is sentry-release-bot[bot] or getsantry[bot] and issue title begins publish: ..github/workflows/auto-approve.yml checks out only auto-approve-repos.txt via actions/checkout@v4 with sparse-checkout-cone-mode: false, creates an app token using actions/create-github-app-token@v3 with vars.SENTRY_INTERNAL_APP_ID and secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY, parses REPO from ISSUE_TITLE using sed -n 's/^publish: \(.*\)@.*/\1/p', and adds the accepted label through gh issue edit "$ISSUE_URL" --add-label accepted only if the exact parsed path occurs in auto-approve-repos.txt.src/modules/update-issue.js updateTargets({ octokit, version, publishRepo, issue_number }) reads ${process.env.GITHUB_WORKSPACE}/__repo__/.craft-publish-${version}.json only if it exists; concurrently fetches the issue and parses the craft-state JSON; transforms the issue body; then updates the GitHub issue body.transformIssueBody(craftState, issueBody) uses TARGETS_SECTION_PARSER_REGEX and TARGETS_PARSER_REGEX to mark declared target checklist entries as checked when craftState.published[targetId] is truthy, retains unchecked entries otherwise, and appends previously unlisted craftState.published targets as - [x] target or - [ ] target.updateIssue({ context, octokit, inputs }) extracts version, context.repo, and context.payload.issue.number; concurrently calls updateTargets(...) and octokit.rest.issues.removeLabel({ ...publishRepo, issue_number, name: "accepted" }), so an issue’s accepted label is removed when this publish update action runs.src/publish/post-result.js gets GitHub context and an authenticated Octokit client, parses PUBLISH_ARGS, takes workflow status from process.argv.slice(2)[0], and calls processEndState({ context, octokit, inputs, status }).src/modules/process-end-state.js processEndState() fetches the current workflow run with octokit.rest.actions.getWorkflowRun({ ...publishRepo, run_id }), posts a status-dependent issue comment, closes the issue only for status === "success", then reports a Sentry session.githubIssueComment() produces: for "failure", Failed to publish. plus run logs focused at #step:8 and a branch-deletion link filtered by encoded version; for "cancelled", Publish workflow cancelled. with the same links; for "success", Published successfully: [run#${run_id}](${workflowInfo.html_url}); unknown statuses throw Unknown status: '${status}'.reportSession() initializes @sentry/node with dsn: process.env.SENTRY_DSN and release ${details.repo}@${details.version}, tags the repository, sets release context containing issue_number and inputs, captures a message, starts/ends a session, and awaits Sentry.close(). sentryInfoFromDetails() maps "failure" to Release failed: ${repo}, severity "error", session "crashed"; "cancelled" to Release cancelled: ${repo}, "warn", "crashed"; and "success" to Release succeeded: ${repo}, "info", "ok"; unknown statuses throw.src/modules/details-from-context.js defines PUBLISH_TITLE_REGEX = /^publish: (?:getsentry\/)?(?<repo>[^/@]+)(?<path>\/[\w./-]+)?@(?<version>[\w.+-]+)$/; parsePublishTitle(title) returns its named groups or null.detailsFromContext({ context }) throws "Issue context is not defined" if no context.payload.issue, and throws Invalid publish issue title: ${context.payload.issue.title} when parsePublishTitle() fails. It returns parsed title fields, dry_run as "1" only with a "dry-run" label, path as "." + (titleMatch.path || ""), merge_target parsed from ^Merge target: (?<merge_target>[\w.\-/]+)$, and checked targets from the matched Targets section.vitest run src/modules/__tests__/approval-attestation.js src/modules/__tests__/approval-authorizer.js src/publish/__tests__/authorize-approval.js src/publish/__tests__/current-accepted-event.js src/publish/__tests__/record-ci-ready-attestation.js src/publish/__tests__/validate-approval-attestation.js passed all 6 files and 33 tests using Vitest v4.0.17; duration was 653ms (tests 104ms), and Yarn completed in 1.10s.vitest run passed all 11 files and 50 tests: validate-approval-attestation.js (7), current-accepted-event.js (2), approval-attestation.js (4), authorize-approval.js (3), approval-authorizer.js (14), process-end-state.js (4), post-workflow-details.js (1), update-issue.js (5), details-from-context.js (5), record-ci-ready-attestation.js (3), and src/libs/__tests__/github.js (2). Duration was 1.78s (tests 266ms); Yarn completed in 2.36s.yarn lint command eslint src .github --ignore-pattern '!.github' failed with 1 error and 0 warnings: .github/workflows/cocoapods-keepalive.yml line 1, column 7 violates yml/plain-scalar (“Must use plain style scalar”); ESLint reported it is potentially fixable with --fix and exited with code 1.