17 Commits

Author SHA1 Message Date
unilock
bae4a6be64 github: remove outdated comment
Signed-off-by: unilock <unilock@fennet.rentals>
2024-04-15 15:29:06 -04:00
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
3f5b953d00 github: Allow specifying branch to retrieve releases for via CLI
Signed-off-by: unilock <unilock@fennet.rentals>
2024-04-15 14:49:02 -04:00
unilock
e5d1d9d383 github: Properly handle writing to pack index
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
Tricked
837b4db760 fix: apply some suggestions 2024-04-15 14:48:57 -04:00
Tricked
faec4f4738 use sha1 instead of sha256 2024-04-15 14:48:57 -04:00
Tricked
5c07741447 feat: add branch support for github mods 2024-04-15 14:48:57 -04:00
Tricked
cb9550f4a6 feat: add support for more url aliases 2024-04-15 14:48:57 -04:00
Tricked
8c97b3e73b fix: use mod.title instead of slug 2024-04-15 14:48:57 -04:00
Tricked
715e9439a1 fix: file hashing 2024-04-15 14:48:57 -04:00
Tricked
07033023af feat: begin github support 2024-04-15 14:48:55 -04:00