Skip to content

Conversation

@refack
Copy link
Contributor

@refack refack commented Jul 14, 2025

To prevent downgrade like a1920db.

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Summary by CodeRabbit

  • Chores
    • Switched Notepad3 version checking to use the GitHub API for latest release detection.
  • Bug Fixes
    • Improved reliability of version parsing and update checks for Notepad3, reducing failures when detecting the newest release.

@github-actions
Copy link
Contributor

Your changes do not pass checks.

notepad3

  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

@refack
Copy link
Contributor Author

refack commented Jul 14, 2025

Job failed for hitting API rate limit

    Autoupdating notepad3 
    Searching hash for  
    Notepad3_6.25.714.1_x86_Portable.zip 
     in  
    https://api.github.com/repos/rizonesoft/Notepad3/releases/latest 
    The remote server returned an error: (403) rate limit exceeded. 
    URL https://api.github.com/repos/rizonesoft/Notepad3/releases/latest is not valid 
    Could not find hash in https://api.github.com/repos/rizonesoft/Notepad3/releases/latest 

Should checkver and autoupdate move away from https://api.github.com/?

@z-Fng
Copy link
Member

z-Fng commented Sep 28, 2025

Hi. Any information? What is the purpose of this PR?

Should checkver and autoupdate move away from https://api.github.com/?

Not necessary IMO.

@refack
Copy link
Contributor Author

refack commented Sep 29, 2025

Any information? What is the purpose of this PR?

some updates where not being picked up (IIRC typo in the release title), and the hash was always being calculated by the bot via the fallback path. So I wanted to dive into the mechanism to grok it.

Not necessary IMO.

👍

@z-Fng
Copy link
Member

z-Fng commented Sep 29, 2025

Hash Extraction

and the hash was always being calculated by the bot via the fallback path.

GitHub predefined hashes have been supported since Scoop v0.5.3.

image

Checkver

some updates where not being picked up (IIRC typo in the release title)

It seems you're referring to this downgrade? a1920db
image

@coderabbitai
Copy link

coderabbitai bot commented Sep 29, 2025

Walkthrough

The Notepad3 Scoop manifest updates its checkver mechanism to use the GitHub Releases API, adding a jsonpath to extract tag_name and retaining the regexp to derive the version. The checkver.url changes from the HTML releases page to the API’s latest release endpoint.

Changes

Cohort / File(s) Summary
Checkver source update
bucket/notepad3.json
Switched checkver.url to https://api.github.com/repos/rizonesoft/Notepad3/releases/latest; added checkver.jsonpath set to $.tag_name; continued using existing checkver.regexp to parse version from the tag.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Scoop as Scoop (checkver)
  participant GH as GitHub API
  participant Parser as Parser

  Scoop->>GH: GET /repos/rizonesoft/Notepad3/releases/latest
  GH-->>Scoop: 200 OK (JSON: { tag_name, ... })

  Note over Scoop,Parser: New step
  Scoop->>Parser: Extract via jsonpath $.tag_name
  Parser-->>Scoop: tag value (e.g., "v6.23.123.4")

  Note over Scoop,Parser: Unchanged step
  Scoop->>Parser: Apply regexp to tag to derive version
  Parser-->>Scoop: version string

  Scoop-->>Scoop: Update manifest version if changed
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

review-needed

Poem

A nibble of tags from API glows,
I twitch my whiskers as version flows.
From pages to JSON, a swift little hop,
Regex and paths—plop plop plop!
Carrot-commits crisp, my paws delight—
Notepad3’s check skips through the night.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description follows the repository’s template by including the boilerplate comments and marking the checklist items, but it still contains the unfilled “Closes #XXXX or Relates to #XXXX” placeholder and does not reference any issue as required. The template explicitly mandates linking to a relevant issue for discussion and resolution, yet no issue number is provided. The checklist entries for the conventional PR title and reading the contributing guide are correctly marked as complete. However, the absence of an actual issue link means the description does not fully comply with the template. Please update the PR description by replacing the “Closes #XXXX or Relates to #XXXX” placeholder with a real issue number that this change addresses, or open a new issue and reference it accordingly. Ensuring the issue linkage is filled in will satisfy the mandatory template requirement and provide proper context for maintainers.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title “[email protected]: Enhance checkver to prevent downgrades” clearly identifies the specific manifest and version being modified and concisely summarizes the primary change—improving the checkver logic to avoid unintended version rollbacks—which aligns directly with the updates to the checkver configuration described in the PR summary.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
bucket/notepad3.json (2)

57-59: Optional: simplify with GitHub shorthand.

Scoop supports the “github” shorthand, avoiding jsonpath plumbing. Behavior remains the same.

-        "url": "https://api.github.com/repos/rizonesoft/Notepad3/releases/latest",
-        "jsonpath": "$.tag_name",
-        "regex": "RELEASE([\\d.]+)"
+        "github": "rizonesoft/Notepad3",
+        "regex": "RELEASE_([\\d.]+)"

59-59: Optional: tighten the regex.

Anchor to the full tag to avoid accidental partial matches if upstream changes naming.

-        "regex": "RELEASE_([\\d.]+)"
+        "regex": "^RELEASE_([0-9.]+)$"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee7b32d and c95f513.

📒 Files selected for processing (1)
  • bucket/notepad3.json (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: Gitoffthelawn
PR: ScoopInstaller/Extras#16106
File: bucket/czkawka-gui.json:25-25
Timestamp: 2025-09-05T09:41:52.653Z
Learning: For czkawka-gui manifests in Scoop Extras, the correct upstream filename pattern for Windows GUI builds in recent versions uses "gtk46" (without underscore), not "gtk_46" (with underscore). The autoupdate URL should use "windows_czkawka_gui_gtk46.zip" format. This was confirmed by a working 10.0.0 update with valid hash.
🔇 Additional comments (1)
bucket/notepad3.json (1)

57-59: Extraction verified; code changes approved
Extraction yields version 6.25.822.1 and asset URLs are correctly constructed—no further updates needed.

@z-Fng z-Fng changed the title notepad3: Update "checkver" and "autoupdate" params [email protected]: Enhance checkver Sep 29, 2025
@z-Fng z-Fng changed the title [email protected]: Enhance checkver [email protected]: Enhance checkver to prevent downgrades Sep 29, 2025
@z-Fng
Copy link
Member

z-Fng commented Sep 29, 2025

/verify. Rebased master.

Enhance checkver to prevent downgrades:
https://github.com/ScoopInstaller/Scoop/blob/b588a06e41d920d2123ec70aee682bae14935939/bin/checkver.ps1#L159-L163

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

notepad3

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

@z-Fng z-Fng merged commit 6621a1d into ScoopInstaller:master Sep 29, 2025
3 checks passed
@refack
Copy link
Contributor Author

refack commented Sep 29, 2025

GitHub predefined hashes have been supported since Scoop v0.5.3

Nice!

It seems you're referring to this downgrade? [a1920db]

Cross referencing the date I think there was also an issue with RELEASE_6.25.714.1
Since I posted this PR on Jul 14
image
I got a notification from GitHub about a new release, and I just couldn't get checkver.ps1 to pick it up. So I went digging... I believe the maintainer fixed the metadata on that release.
image

@refack refack deleted the patch-1 branch September 29, 2025 21:23
@z-Fng
Copy link
Member

z-Fng commented Sep 30, 2025

I got a notification from GitHub about a new release, and I just couldn't get checkver.ps1 to pick it up. So I went digging... I believe the maintainer fixed the metadata on that release.

Thank you for looking into this~ It seemed to be working well.

The workflow picked up this version automatically a few hours after the release was published.

  • Released at: Jul 14, 2025, 6:58 AM EDT
  • Picked up at: Jul 14, 2025, 12:29 PM EDT

See also: https://github.com/ScoopInstaller/Extras/actions/runs/16272367741/job/45942979889

notepad3: 6.25.714.1 (scoop version is 6.24.1221.1) autoupdate available
Autoupdating notepad3
Downloading https://github.com/rizonesoft/Notepad3/releases/download/RELEASE_6.25.714.1/Notepad3_6.25.714.1_x86_Portable.zip (6.2 MB)...
Computed hash: 15ca95894e51c6001e22d97d42fd0662726010e7cf934db663e64395e7d13133
Downloading Notepad3_6.25.714.1_x64_Portable.zip to compute hashes!
Downloading https://github.com/rizonesoft/Notepad3/releases/download/RELEASE_6.25.714.1/Notepad3_6.25.714.1_x64_Portable.zip (6.5 MB)...
Computed hash: c844fe653619b73397e4ad5380fffc8b452c827a388f900638df29de39cd7cb1
Writing updated notepad3 manifest

@coderabbitai coderabbitai bot mentioned this pull request Sep 30, 2025
2 tasks
@refack
Copy link
Contributor Author

refack commented Sep 30, 2025

Thank you for looking into this~ It seemed to be working well.

Thank you for closing that loop with the logs. It could have been just me doing things wrong, and stumbling into a fix...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants