Skip to content

feat(spcli): make settle-deal optionally take deal id ranges#13146

Merged
rvagg merged 1 commit intomasterfrom
rvagg/settle-deals-range
May 30, 2025
Merged

feat(spcli): make settle-deal optionally take deal id ranges#13146
rvagg merged 1 commit intomasterfrom
rvagg/settle-deals-range

Conversation

@rvagg
Copy link
Copy Markdown
Member

@rvagg rvagg commented May 29, 2025

Copilot AI review requested due to automatic review settings May 29, 2025 04:44
@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz May 29, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds optional range support to the settle-deal command so users can specify deal IDs as individual numbers or ranges.

  • Updates documentation to mention range syntax in both general CLI docs and the lotus-miner help output
  • Extends the settle-deal handler to parse hyphenated ranges and expand them into individual deal IDs

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
documentation/en/cli-lotus-miner.md Updated usage examples to show how to pass individual IDs or ranges
cli/spcli/actor.go Added strings import, enhanced Usage text, and implemented range parsing in settle-deal
Comments suppressed due to low confidence (3)

cli/spcli/actor.go:44

  • [nitpick] Update the ArgsUsage string to indicate that ranges are supported (e.g., "[...dealIds|ranges]") so users know how to pass hyphenated ranges.
ArgsUsage: "[...dealIds]",

cli/spcli/actor.go:75

  • Add unit tests for the range parsing logic, covering valid ranges, invalid formats, and reversed ranges to ensure the new behavior is fully tested.
if strings.Contains(d, "-") {

cli/spcli/actor.go:101

  • Rename the variable dealId to dealID to follow Go conventions for acronyms and improve consistency with dealIDs.
dealId, err = strconv.ParseUint(d, 10, 64)

@rvagg rvagg force-pushed the rvagg/settle-deals-range branch from 03f6b5f to 8130066 Compare May 29, 2025 05:13
Copy link
Copy Markdown
Contributor

@simlecode simlecode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rjan90 rjan90 moved this from 📌 Triage to ✔️ Approved by reviewer in FilOz May 29, 2025
@rvagg rvagg merged commit 7f1cb0d into master May 30, 2025
95 of 96 checks passed
@rvagg rvagg deleted the rvagg/settle-deals-range branch May 30, 2025 01:33
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

4 participants