Skip to main content

Module notes

Module notes 

Source
Expand description

The managed blocks in review descriptions: the user’s description, the issue-closing link, and the stack-overview ledger ([ledger]), all built on marker-delimited [sections].

Functions§

branch_references_issue
Whether a branch name references an issue git-stk would link with a Closes #N note. Lets the caller predict whether a seeded template will be followed by managed content (and so needs a seam rule).
seed_template_notes
Seed each freshly created review’s body with the repo’s PR/MR template, so the managed sections below augment it instead of --fill replacing it. Create-only - existing reviews keep whatever body they have - and skipped when stk.usePrTemplate is off or the repo has no single template. Each entry is a freshly created branch and whether git-stk will write a managed section (description, Closes #N, or stack overview) into its review below the template - which decides whether a seam rule is seeded.
update_closes_notes
Add a Closes #N line to each branch’s review when the branch name references an issue (e.g. 123-fix-thing, fix/issue-123), so the platform closes the issue when the review merges. Branches without an issue reference are passed over silently.
update_description_note
Write (or, with an empty string, clear) the description block in the branch’s review body. Unlike the stack overview the block is sticky: submits without --desc never touch it.
update_stack_notes
Maintain a stack overview in every review body, one independent stack at a time: a PR’s overview must list only its own stack, never sibling stacks that merely share the trunk. branch_parents can span several such stacks (e.g. a sync run from the trunk), so group by each branch’s child-of-trunk root and refresh each group’s notes on its own.