1
0
mirror of https://github.com/packwiz/packwiz.git synced 2025-04-27 16:46:30 +02:00

7 Commits

Author SHA1 Message Date
unilock
72afdee4d8 github: Handle empty x-ratelimit-remaining header
Signed-off-by: unilock <unilock@fennet.rentals>
2024-04-15 14:49:02 -04:00
unilock
3859b37267 github: Notify user when encountering GitHub API ratelimit
Signed-off-by: unilock <unilock@fennet.rentals>
2024-04-15 14:49:02 -04:00
unilock
d7fd884f48 github: Use Viper for GitHub API token
Signed-off-by: unilock <unilock@fennet.rentals>
2024-04-15 14:49:02 -04:00
unilock
8d4f8d9a86 github: Accept GitHub API token via OS environment variable
"GH_API_TOKEN"

Signed-off-by: unilock <unilock@fennet.rentals>
2024-04-15 14:48:57 -04:00
unilock
c96a6a30ad github: don't return releases on wrong branch
if a branch is specified, but a release cannot be found on that branch, return an error instead of simply the latest release

Signed-off-by: unilock <unilock@fennet.rentals>
2024-04-15 14:48:57 -04:00
unilock
01945213d7 github: standardize language + fix api requests
language:
- funcs, vars, log messages, etc.

api requests:
- make all requests use the makeGet() function
- include packwiz user agent

Signed-off-by: unilock <unilock@fennet.rentals>
2024-04-15 14:48:57 -04:00
unilock
6116393310 github: fixes and improvements
- "file" -> "asset"
- "version" -> "tag" or "release" (where appropriate)
- fix updater.go for upstream changes
- make printed log messages more similar to those of other modules
- move http request function(s) to separate file "request.go"
- remove the concept of a "Mod"; we're using "Repo"s (GitHub repositories) instead
- remove unnecessary fields in structs
- use sha256 instead of sha1 for asset checksums

Signed-off-by: unilock <unilock@fennet.rentals>
2024-04-15 14:48:57 -04:00