Conversation
Fix several issues that only show up outside of Github Actions or on error paths: - Guard `$env.GITHUB_OUTPUT` behind a `set-action-output` helper, so that `create`/`close` no longer fail with a column-not-found error when run locally via `just` or during manual debugging - Add `check-graphql-errors` in `query.nu` and use it in both `query-issue-status` (which previously did no error checking at all) and `query-pr-closing-issues` (which discarded the error payload); the real diagnostics are now printed and the first message is carried in `error make` - Drop the redundant `--remove-milestone` calls on the `--force` path: the REST PATCH is already overwrite semantics, and the extra call created a visible intermediate state plus a duplicated "will be ignored" message - Make `is-int` match ASCII digits only, since `\d` in Rust regex covers the whole Unicode Nd category and accepted input like '123' as a milestone number - Import `has-ref` from `common.nu` in `release.nu` instead of relying on the Justfile overlay - Replace the long-removed `register -e json` with `plugin add` in `_setup`
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 5 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe pull request updates Nushell setup compatibility, milestone mutation behavior, GitHub Actions output handling, integer validation, GraphQL error reporting, and release-script imports. ChangesNushell workflow updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR makes localized error-handling, environment-compatibility, command cleanup, input-validation, and setup changes; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
) * fix: Send milestone fields as raw strings and harden action inputs Follow-up to the #168/#170/#172/#174 review. `create` could not produce a purely numeric title, `force: yes` aborted with a raw Nushell error, and several paths only reachable outside Actions failed with type errors. - milestone.nu: use `gh api -f` (raw-field) instead of `-F` for `title`, `description`, `due_on` and `state`; `-F` applies magic type conversion, so `title: '20260821'` was sent as a JSON number and rejected with `422 ... 20260821 is not a string` - common.nu: add `parse-bool`, accepting true/yes/on/1 and false/no/off/0 and falling back to each input's documented default when empty; replaces the `into bool` call that aborted on `force: yes` - milestone.nu: extract `resolve-milestone-id`, replacing the two verbatim lookup blocks in `close-milestone`/`delete-milestone`, and report an empty or unmatched milestone with `INVALID_PARAMETER` - milestone.nu: default `--milestone` to `''` so `close`/`delete` without it report a message instead of `can't convert nothing to string` - milestone.nu: add `resolve-gh-token`, falling back to the gh CLI's own credential so `just dr` / `just di` work without an exported GH_TOKEN - milestone.nu: exit with `INVALID_PARAMETER` on an unknown action, and drop the `-d` short flag from `--dry-run`, which means `--due-on` on `milestone-action` - milestone.nu: move the "PATCH overwrites" comment below the no-milestone guard, where it is actually true, and say so when `--force` has no replacement to apply rather than doing nothing silently - query.nu: give `check-graphql-errors` typed pipeline input - ci.yml: cover numeric titles and closing an already-closed milestone; compute the due date in bash so the second Nu version pin is gone - create/close/delete.yml: run `uses: ./` behind a checkout, so a dispatch exercises the branch it came from instead of `@develop` - Document that an all-digit `milestone` is always read as a number * docs: Scope the all-digit milestone rule to close and delete The note added in ca12e6c stated the rule unconditionally, but it only holds for `close`/`delete`, which route an all-digit `milestone` through `resolve-milestone-id`. `bind-pr`/`bind-issue` pass the value straight to `get-milestone-number`, which matches on `title`, so there an all-digit value is a title - as the README input table already said. - action.yaml: state the rule per action instead of for the input as a whole - README/README.zh-CN: note that bind matches by title only
Fix several issues that only show up outside of Github Actions or on error paths:
$env.GITHUB_OUTPUTbehind aset-action-outputhelper, so thatcreate/closeno longer fail with a column-not-found error when run locally viajustor during manual debuggingcheck-graphql-errorsinquery.nuand use it in bothquery-issue-status(which previously did no error checking at all) andquery-pr-closing-issues(which discarded the error payload); the real diagnostics are now printed and the first message is carried inerror make--remove-milestonecalls on the--forcepath: the REST PATCH is already overwrite semantics, and the extra call created a visible intermediate state plus a duplicated "will be ignored" messageis-intmatch ASCII digits only, since\din Rust regex covers the whole Unicode Nd category and accepted input like '123' as a milestone numberhas-reffromcommon.nuinrelease.nuinstead of relying on the Justfile overlayregister -e jsonwithplugin addin_setupcloses #171
Summary by CodeRabbit
Bug Fixes
Compatibility