Dashboard › craft › Distillation
5de79e70-fb18-41a2-976c-1d6144cb8c5f["lore_tm_v1_wiJBHGvN-sUifl8ikLvTNNCuW_ArzhBH5DmkJxdEYNo","lore_tm_v1_5eTn2nhd8yqn3hdDwtIO2vx420hFz5dbBhQMtBcyk80","lore_tm_v1_aq85NVD8LnjuEaclIs9Mn_b1ZW_aVzi9JxDg-JJ8428","lore_tm_v1_B7Wpi_FVqNhLiVFQioln3dgurE-CMUR3BOjLcArbt-4","lore_tm_v1_y3QLD9SsG3kbPyh4pyvfva75XxGHxC2n2KdEyTHTCdY","lore_tm_v1_-nQPfenkZzq_92S0sITZTHv5IJPxNx-e-CdZq5ySf9g","lore_tm_v1_LdwNx7hv97dfPYZHLdeZ07zLeqh-surblT7CiUka0b8","lore_tm_v1_NmYmrOthGw-j1HrwrZIq6hiErOOu3YiUeEM12vBWZlM"]
Date: Aug 29, 2026
/home/byk/Code/getsentry/craft-workspace-action-propagation/src/__tests__/action.test.ts found 4 matches related to mocked gh issue create title capture: shell condition if [[ "$*" == *"issue create"* ]]; then, printf '%s\\n' "$2" >> "$GH_TITLES", execution of getActionStep('Request publish').run!, and environment variable GH_TITLES: environment.ghTitles.src/__tests__/action.test.ts test fixture creates executable mock craft, git, and gh commands. Mock Craft appends all invocations to $CRAFT_CALLS and returns ["github"] for targets; mock Git appends invocations to $GIT_CALLS; mock GitHub CLI returns [] for issue list, captures the argument following --title to $GH_TITLES for issue create, and returns https://github.com/getsentry/publish/issues/1.runRequestPublish(workspace, environment) executes the Request publish action step using bash -e -c, with GITHUB_ACTOR=byk, GITHUB_REPOSITORY=getsentry/toolkit, PUBLISH_REPO=getsentry/publish, RELEASE_BRANCH=release/1.2.3, RELEASE_PREVIOUS_TAG=1.2.2, RELEASE_SHA=abc123, RESOLVED_VERSION=1.2.3, MERGE_TARGET=(default), TARGETS= - [ ] github, SUBDIRECTORY='', and the supplied WORKSPACE.runActionStep() executes named action steps using bash -e -c, injecting mocked Craft/Git paths and WORKSPACE; defaults are pathInput='.' and locale='C'.passes option-looking workspace names inline to Craft verifies workspace --config-from=untrusted is passed as prepare --workspace=--config-from=untrusted and targets --workspace=--config-from=untrusted, preventing it from being interpreted as a separate CLI option.forwards workspace input to every Craft command verifies Validate workspace receives PATH_INPUT=${{ inputs.path }} and both Craft Prepare and Read Craft Targets receive WORKSPACE=${{ inputs.workspace }}.cli\tnext), right-to-left override (cli\u202enext), line separator (cli\u2028next), paragraph separator (cli\u2029next), or non-ASCII é (cli-é) before any action side effect: Validate workspace exits 1 and mock Git/Craft call logs remain empty.cli-é is also rejected under LC_ALL=en_US.utf8, with no mock Git or Craft calls.'' and cli-v2.workspace='cli' and pathInput='packages/cli', and reject workspace cli/v2 outside the compact-title grammar; both must fail before Git/Craft side effects.uses the compact workspace path in publish request titles verifies root title publish: getsentry/toolkit@1.2.3 and workspace title publish: getsentry/toolkit/cli@1.2.3..github/workflows/publish.yml, package.json, and src/modules/details-from-context.js; untracked pnpm-lock.yaml, scripts/, src/modules/__tests__/publish-location.js, src/modules/__tests__/release-revision.js, src/modules/publish-issue-title.js, src/modules/publish-issue-title.peggy, src/modules/publish-location.js, src/modules/release-revision.js, src/publish/resolve-location.js, and src/publish/resolve-release-revision.js..github/workflows/publish.yml has 58 changed lines; package.json has 2 insertions; src/modules/details-from-context.js has 15 changed lines; aggregate is 39 insertions and 36 deletions across 3 tracked files.node .__publish__/src/publish/inputs.js, posts workflow-start details only when steps.inputs.outcome == 'success', then resolves the CI-approved release revision through node .__publish__/src/publish/resolve-release-revision.js using PUBLISH_ARGS=${{ steps.inputs.outputs.result }} and PUBLISH_ISSUE_BODY=${{ github.event.issue.body }}.actions/create-github-app-token@v3, owner getsentry, then checks out getsentry/${{ fromJSON(steps.inputs.outputs.result).repo }} to __repo__ at ${{ steps.release-revision.outputs.revision }}, with fetch-depth: 0, only if parsed input result exists.__repo__/.craft.yml exists, it runs immutable getsentry/craft:2.31.0 workspace list in Docker with host $GITHUB_WORKSPACE/__repo__ mounted at /github/workspace/__repo__; otherwise it uses workspace list JSON []. It passes the result as CRAFT_WORKSPACE_NAMES to node .__publish__/src/publish/resolve-location.js.Set targets step receives repository, resolved path, version, optional resolved workspace, and JSON targets. It renders an “already published” payload with jq: [{($source[]): true }] | add | {"published": (. // {}) }.container_cwd as realpath -m "/github/workspace/__repo__/$CRAFT_PUBLISH_PATH" and rejecting it unless it equals /github/workspace/__repo__ or remains below that directory. It hashes this container-visible cwd via sha1sum | cut -c1-12.getsentry, $CRAFT_PUBLISH_REPO, and $CRAFT_PUBLISH_VERSION to lowercase [a-z0-9._-], converting other runs to _ and trimming edge underscores. If a workspace exists, it Base64 URL-encodes it without = padding and prefixes the state filename with workspace-${workspace_encoded}-.$GITHUB_WORKSPACE/.craft-state/craft/publish-state-${owner_sanitised}-${repo_sanitised}-${cwd_hash}-${workspace_prefix}${version_sanitised}.json, exports state_file through $GITHUB_OUTPUT, and states this external state directory prevents checked-out repository contents from pre-populating Craft state.docker://getsentry/craft:2.31.0 for publishing, with /bin/bash -e -c; it sets HOME=/root, changes to __repo__/${{ fromJSON(steps.location.outputs.result).path }}, and executes craft publish <input version> --rev <resolved CI-approved revision>.XDG_STATE_HOME=/github/workspace/.craft-state, CRAFT_PUBLISH_WORKSPACE from resolved location (or empty), and CRAFT_PUBLISH_STATE_GITHUB_REPO=getsentry/<input repo>; the workflow comment specifies state identity follows the issue checkout rather than a workspace’s optional GitHub release-repository override.node .__publish__/src/publish/update-issue.js with CRAFT_STATE_FILE_PATH=${{ steps.craft-state.outputs.state_file }}; cancellation, failure, and success respectively call post-result.js cancelled, post-result.js failure, and post-result.js success.src/modules/publish-location.js defines resolvePublishLocation({ path, workspace, workspaceNames }). An explicitly supplied workspace takes precedence and returns { path, workspace }.resolvePublishLocation() validates every discovered workspace name using isWorkspaceName; invalid discovery throws Error("Craft workspace discovery returned an invalid workspace list."). Valid names must be strings other than __proto__ matching /^[A-Za-z0-9_.-]+$/.path is exactly a single ./<segment> whose segment occurs in discovered workspace names, resolvePublishLocation() converts it to { path: ".", workspace: <segment> }; otherwise it returns { path } unchanged.