Skip to content

rig 3.26.1

Choose a tag to compare

@github-actions github-actions released this 29 Sep 19:33
26eb96c

A work always lands in the data root that holds it (#227)

A work always lands in the data root that holds it

Tickets: #104, #170, #107, #154

Direction

Four fixes to one question, which data root a command is in, each its own stage stacked on the work branch.

  1. #104, rig update with nothing selected. update gathers its location the way doctor does: catch the refusal and fall back to the tool checkout, so the tool, every configured root and the freshness cache still move. update does not say the refusal itself. It ends in the doctor checks, which already say it word for word and count it, so saying it in update too would say it twice.
  2. #170, placement by org. repoAtCwd names a repo org/repo from its remote, and rootsCataloguing matches catalog/<org>/<repo>.md when the name carries an org; a bare name (a folder with no origin, --repos) matches any org as today. Standing in a configured data root's own checkout places the command in that root, asked after --repos and before the repo at the cwd. The Jira-key placement is left out unless it stays small.
  3. #154 item 6 only (part of #154, never closes it). describe carries the upstream the branch's config names even when its ref is not here. prepareDataRoot and updateCheckout fetch when one is configured but missing before concluding "no upstream", and doctor stops telling such a root to push to a private repo.
  4. #107, the work folder's marker. regenerate writes .rig/data only when the root in hand is the one root that holds the work's record. With more than one root configured, doctor warns about a work folder with no marker, and about one whose marker names a root that does not hold its record. Built last: it edits bin/doctor.mjs, which open PR #196 also changes.

Why not more: the Jira-key placement (#170's third point) and #154 items 2 to 5 belong to other works or later.

Planned stages

Stage branch Delivers Ticket
fix/update-without-a-current-root rig update brings everything forward when no root is selected #104
fix/place-a-work-by-org-and-root-checkout placement matches the org, and a data root's own checkout places itself #170
fix/fetch-a-missing-upstream a data root whose upstream ref is missing fetches before saying "no upstream" (#154 item 6) —
fix/the-marker-names-the-root-that-holds-the-record the marker is written only where the record is, and doctor reports folders without one #107

Stages

Order Stage Delivers Repos PR State
1 fix/update-without-a-current-root rig update brings the tool and every root forward when no data root is selected rig #203 landed
2 fix/place-a-work-by-org-and-root-checkout placement matches the repo's org, and a data root's own checkout places the command in that root rig #206 landed
3 fix/fetch-a-missing-upstream a data root whose configured upstream ref is missing locally fetches before saying no upstream (part of #154, item 6) rig #210 landed
4 fix/the-marker-names-the-root-that-holds-the-record the work folder's marker is written only where the record is, and doctor reports a folder without one rig #213 landed

Context doc: https://github.com/hugoforte/rig-data/blob/main/work/root-placement/context.md

Full changelog: v3.26.0...v3.26.1