-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: version check #127
base: main
Are you sure you want to change the base?
feat: version check #127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to 1b8a3e4 in 1 minute and 59 seconds
More details
- Looked at
1039
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. src/updates.rs:30
- Draft comment:
Consider using a dedicated semver parser instead of string comparison for version numbers. For example, comparing '0.10.0' with '0.8.4' lexically may yield incorrect results. - Reason this comment was not posted:
Marked as duplicate.
2. src/updates.rs:28
- Draft comment:
Consider checking the HTTP response status explicitly before attempting to deserialize JSON. This could help in diagnostics if GitHub returns an error response. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
The code already has reasonable error handling through ok()? pattern. Adding explicit status checking would be redundant since reqwest handles this. The function returns Option and gracefully handles all errors by returning None. For a simple update checker, this level of error handling is appropriate - users don't need detailed error diagnostics.
Maybe detailed error diagnostics would help users understand why update checks fail. The current code silently fails with None for any error.
For an update checker that runs in the background, silent failure is actually preferable - users don't need to see diagnostic messages for temporary network issues or GitHub API problems.
The comment should be deleted. The existing error handling is appropriate for this use case, and adding explicit status checking would be unnecessary complexity.
3. src/main.rs:106
- Draft comment:
In the documentation for the 'Ls' subcommand, please change 'upto a maximum of 1000' to 'up to a maximum of 1000' for clarity. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. src/main.rs:122
- Draft comment:
Please update 'upto a maximum of 1000' to 'up to a maximum of 1000' in the 'ListBasins' subcommand documentation. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. src/main.rs:256
- Draft comment:
In the 'Fence' subcommand documentation, please change 'It may be upto 16 bytes' to 'It may be up to 16 bytes' for proper spacing. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_pwps4bngM3o6iCqB
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
let current = env!("CARGO_PKG_VERSION"); | ||
let current = current.trim_start_matches('v'); | ||
|
||
if latest > current { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a proper semantic versioning comparison instead of string comparison (lines 30-37). Lexicographical comparison can misorder versions (e.g., "10.0" vs "9.9"). Using the semver crate would be more robust.
Important
Add version check command to CLI for checking the latest release from GitHub.
VersionCheck
command toCommands
enum inmain.rs
to check for the latest version.check_for_updates()
inupdates.rs
to fetch the latest release from GitHub.reqwest
dependency inCargo.toml
for HTTP requests.Cargo.lock
with new dependencies and versions.This description was created by
for 1b8a3e4. It will automatically update as commits are pushed.