Skip to content

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

@abgox

Description

@abgox

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.

Describe the solution you'd like

If failed to get version by API:

  1. First attempt to fetch version information by parsing the project release page. (It actually exists, but it is not used as a fallback.)
  2. If web scraping also fails, then proceed to the next application's update check.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions