Skip to content

fix(checkver): skip default JSONPath for scripts - #6692

Open
massimomazzariol wants to merge 1 commit into
ScoopInstaller:developfrom
massimomazzariol:fix/checkver-script-default-jsonpath
Open

fix(checkver): skip default JSONPath for scripts#6692
massimomazzariol wants to merge 1 commit into
ScoopInstaller:developfrom
massimomazzariol:fix/checkver-script-default-jsonpath

Conversation

@massimomazzariol

Copy link
Copy Markdown

Description

Skip the default GitHub API JSONPath when checkver.script is configured. Explicit jsonpath settings continue to work.

Closes #6681

Testing

  • Reproduced the issue with GitHub mode, a custom script, and regex
  • Verified normal GitHub mode still uses $.tag_name
  • Verified explicit JSONPath still applies to script output
  • Windows PowerShell 5.1: 121 passed, 0 failed
  • PowerShell 7: 121 passed, 0 failed

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 31f42bfe-5c1b-4365-bef2-75e16073857b

📥 Commits

Reviewing files that changed from the base of the PR and between 7944429 and 87795d7.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • bin/checkver.ps1
🚧 Files skipped from review as they are similar to previous changes (2)
  • CHANGELOG.md
  • bin/checkver.ps1

Summary by CodeRabbit

  • Bug Fixes
    • Fixed version checking in GitHub API mode when using a custom script, so the default JSON extraction path is no longer applied incorrectly.
    • Updated the changelog to document the fix under the Unreleased section.

Walkthrough

checkver now avoids applying the default GitHub JSONPath when a custom script is configured. The unreleased changelog documents this behavior change.

Changes

Checkver JSONPath handling

Layer / File(s) Summary
Custom-script JSONPath selection
bin/checkver.ps1, CHANGELOG.md
GitHub mode assigns $.tag_name only when no custom script is present, and the Unreleased changelog records the fix.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the change: skipping the default JSONPath for checkver scripts.
Description check ✅ Passed The description matches the change and mentions preserving explicit JSONPath behavior.
Linked Issues check ✅ Passed The change bypasses the default GitHub JSONPath when a script is configured, matching #6681.
Out of Scope Changes check ✅ Passed Only a small changelog update appears outside code, and it is directly related to this fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@massimomazzariol
massimomazzariol force-pushed the fix/checkver-script-default-jsonpath branch from 7944429 to 87795d7 Compare July 22, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant