Draft lifecycle above the workspace primitives: create, approve, discard and
status. Each mutation crosses the extension op-hook boundary (:draft/create,
:draft/approve, :draft/discard), so an extension can veto it with a
:before guard or observe it with an :after hook.
Approval requires the draft to contain the local and fetched origin target.
It fast-forwards locally, restores saved local work, then pushes to origin
when configured. Conflicts must be resolved in the draft before approval.
Every new commit crosses the :git/commit boundary.
Draft lifecycle above the workspace primitives: create, approve, discard and status. Each mutation crosses the extension op-hook boundary (`:draft/create`, `:draft/approve`, `:draft/discard`), so an extension can veto it with a `:before` guard or observe it with an `:after` hook. Approval requires the draft to contain the local and fetched origin target. It fast-forwards locally, restores saved local work, then pushes to origin when configured. Conflicts must be resolved in the draft before approval. Every new commit crosses the `:git/commit` boundary.
(approve! env {:keys [workspace-id message]})Commit the draft, require synchronized local/origin history, fast-forward the target, restore local changes with their index, then push without force when origin exists. Overlapping local paths are refused before stashing. Failed restore retains its stash and prevents push; failed push reports local landing. The draft stays active. Retry also publishes an already-landed commit. opts: :workspace-id and optional :message. Returns :approved or :nothing-to-approve with :published indicating whether origin was pushed.
Commit the draft, require synchronized local/origin history, fast-forward the target, restore local changes with their index, then push without force when origin exists. Overlapping local paths are refused before stashing. Failed restore retains its stash and prevents push; failed push reports local landing. The draft stays active. Retry also publishes an already-landed commit. opts: :workspace-id and optional :message. Returns :approved or :nothing-to-approve with :published indicating whether origin was pushed.
(create! env opts)Create a draft through the :draft/create boundary; opts are
workspace/create!'s. env carries :db-info and :session-id.
Create a draft through the `:draft/create` boundary; `opts` are `workspace/create!`'s. `env` carries `:db-info` and `:session-id`.
(discard! env {:keys [workspace-id reason session-state-id]})Discard workspace-id through the :draft/discard boundary. With
:session-state-id, the session is repointed to the trunk inside the
boundary — a veto leaves it pinned to its draft — and workspace/abandon!
then removes the draft. Returns [abandon-result trunk].
Discard `workspace-id` through the `:draft/discard` boundary. With `:session-state-id`, the session is repointed to the trunk inside the boundary — a veto leaves it pinned to its draft — and `workspace/abandon!` then removes the draft. Returns `[abandon-result trunk]`.
(status ws)Landing status: draft :branch, :target-branch, commits the target lacks (:ahead) and pending paths (:pending). Git facts are nil outside a repository.
Landing status: draft :branch, :target-branch, commits the target lacks (:ahead) and pending paths (:pending). Git facts are nil outside a repository.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |