✨ feat: P-16 onboard makes the Project views

Merged
AT
1mo ago
+244-38

Slice: #44

onboard (with board on, including onboard --add board) now makes the Project's views through GitHub's GraphQL API, which can now create and update them (createProjectV2View, updateProjectV2View; checked by introspection). It used to print that the API cannot.

viewlayoutfiltershown
Needs youtablelabel:needs-owner is:open
BoardboardLinked pull requests
Work itemstabletype:"Work item"Sub-issues progress
Decisionstabletype:Decision
Reviews duetable"Review date":<=@today
  • A view that already has the name is updated (layout, filter, a hidden field shown); others are left alone.
  • The default "View 1" becomes Needs you instead of being left.
  • A rerun asks nothing and makes no duplicates. All view changes wait for one yes; declining stops at "views".
  • It then prints only what the API still cannot set: Work items grouped by Step, Decisions grouped by Decision, the Board's column field (no "In review" column), and the auto-archive workflow is:closed updated:<@today-7d (the API can only read or delete workflows).

Proven in the sandbox client's Project ("process-rules-sandbox work"), as AthyaBot, read back from the API:

{"number":1,"name":"Needs you","layout":"TABLE_LAYOUT","filter":"label:needs-owner is:open"}
{"number":3,"name":"Board","layout":"BOARD_LAYOUT","filter":null,"visible":[…,"Linked pull requests",…],"columns":["Status"]}
{"number":4,"name":"Work items","layout":"TABLE_LAYOUT","filter":"type:\"Work item\"","visible":[…,"Sub-issues progress"]}
{"number":5,"name":"Decisions","layout":"TABLE_LAYOUT","filter":"type:Decision"}
{"number":6,"name":"Reviews due","layout":"TABLE_LAYOUT","filter":"\"Review date\":<=@today"}

The first run asked once, renaming "View 1"; a rerun asked nothing. After Board was given a filter with Linked pull requests hidden, and Work items was switched to a board, a rerun put both back.

Also bumps package.json to 0.5.0 and the README's install line, as for 0.4.0, so v0.5.0 can be tagged on main once this merges. docs/decisions.md records the owner's decision on #22.

pnpm check: 436 tests pass; board.ts 100% lines.

🤖 Generated with Claude Code