Scoop
Scoop copied to clipboard
[Feature] Add fallback to get version if Github API fails
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:
- 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.
- If failed to get version by API, first attempt to fetch version information by parsing the release page.
- 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
- @z-Fng
- I think it's time to pay attention to this issue.
- Because there are already a large number of
rate limit exceededin the Excavator
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)?([^\"?]+)"
},
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.