Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

[Feature] Add fallback to get version if Github API fails

Open abgox opened this issue 4 months ago • 3 comments

Feature Request

"checkver": "github",
"autoupdate": {
    "hash": {
        "mode": "github"
    }
}
  • If we define it this way, it will consume two Github API requests.

    I don't know whether the request data was cached or not. But the focus here is not on how many API requests are consumed

  • If there are more than 2,500 applications, it will exceed the API limit (5,000 requests/hour).
  • Currently, if failed to get hash by API, it will fallback by downloading the installation package.
  • But, if failed to get version by API, it will directly to the next app to check update.

Describe the solution you'd like

Two feasible solutions I think of:

  1. Get version from web page
    • If failed to get version by API, first attempt to fetch version information by parsing the release page.
      • It seems to already exist; it's just that it hasn't been used in this way yet.
    • If web scraping also fails, then proceed to the next application's update check.
  2. Allow Excavator to set multiple tokens, and if a token reaches the limit, use the next token.

Related script file: https://github.com/ScoopInstaller/Scoop/blob/develop/bin/checkver.ps1

abgox avatar Aug 20 '25 04:08 abgox

  • @z-Fng
  • I think it's time to pay attention to this issue.
  • Because there are already a large number of rate limit exceeded in the Excavator
Image

abgox avatar Oct 26 '25 07:10 abgox

In the abyss bucket, it is obtained in this way, which can be used as a reference.

"checkver": {
    "url": "https://github.com/PowerShell/PowerShell/releases/latest",
    "regex": "/tree/(?:v|V)?([^\"?]+)"
},

abgox avatar Oct 26 '25 07:10 abgox

I think it's time to pay attention to this issue. Because there are already a large number of rate limit exceeded in the Excavator

Thanks for the reminder. I've noticed it and have been thinking about how to address this recently.

z-Fng avatar Oct 26 '25 16:10 z-Fng