@veda-hq/niyam 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -667,8 +667,9 @@ after Work rules on every event Work rules runs on (the pull request opening
667
667
  or reopening, a push to it, an edit of it) and again when a failed Work rules
668
668
  is re-run, so a slice that could not be built when its pull request opened
669
669
  moves once it can. A slice and work item already where they belong are not
670
- written again, and a slice no open Project holds gets a line saying it is
671
- not on the board. The client's
670
+ written again. A slice no open Project holds gets a line saying it is not
671
+ on the board, and one on a Project whose Status has no In Progress option
672
+ gets a line naming that Project. The client's
672
673
  workflow passes it the app's client id and private key as the
673
674
  `NIYAM_BOARD_APP_ID` and `NIYAM_BOARD_APP_KEY` secrets. With `board` on,
674
675
  onboard writes them under the `niyam` job's secrets, the pull request job
@@ -1677,7 +1678,7 @@ tag and the commit. Install the attached package on each machine with pnpm,
1677
1678
  once; nothing is built on install:
1678
1679
 
1679
1680
  ```bash
1680
- pnpm add -g https://github.com/veda-hq/niyam/releases/download/v0.7.2/veda-hq-niyam-0.7.2.tgz
1681
+ pnpm add -g https://github.com/veda-hq/niyam/releases/download/v0.7.3/veda-hq-niyam-0.7.3.tgz
1681
1682
  ```
1682
1683
 
1683
1684
  The package puts one command on `PATH`, `niyam`. Since P-57 a release
package/dist/board.js CHANGED
@@ -632,11 +632,14 @@ export async function boardStarted(sys, token, slug, slice) {
632
632
  const items = await projectItems(sys, token, slug);
633
633
  const steps = stepMoves(items.step, parent);
634
634
  const held = items.status.filter((item) => item.number === slice);
635
- const moved = await move(sys, token, [...held.map((item) => ({ item, option: 'In Progress', name: `slice #${slice}`, what: `slice #${slice} is In Progress` })), ...steps.moves]);
636
- // A slice on no Project has nothing to move: say so, rather than let "nothing moved" read as "in place".
635
+ const movable = held.filter((item) => optionOf(item.field, 'In Progress'));
636
+ const moved = await move(sys, token, [...movable.map((item) => ({ item, option: 'In Progress', name: `slice #${slice}`, what: `slice #${slice} is In Progress` })), ...steps.moves]);
637
+ // A slice on no Project, or on one whose Status cannot take it, has nothing to move: say so, rather than let "nothing moved" read as "in place".
637
638
  const missing = held.length === 0
638
639
  ? [`! board: slice #${slice} is not on the board: no open Project of ${slug.split('/')[0]} with a Status field holds it unarchived, so it did not move to In Progress`]
639
- : [];
640
+ : held
641
+ .filter((item) => !movable.includes(item))
642
+ .map((item) => `! board: Status in "${item.project}" has no option In Progress, so slice #${slice} stays where it is; add the option to the Project's Status field`);
640
643
  return [...moved, ...missing, ...steps.lacking];
641
644
  }
642
645
  function stopped(io, step) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veda-hq/niyam",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Work rules for repos that track work in GitHub Issues: setup, agent identity, push and PR checks.",
5
5
  "license": "MIT",
6
6
  "repository": {