Commit Graph

19 Commits

Author SHA1 Message Date
4a0addda67 Fold client-error-decode into a util function 2025-06-07 23:40:58 -05:00
aadaff5db4 Add "No such release" error variant 2025-06-05 20:58:46 -05:00
e0c21fceaf Autoformat the whole thing
I've been putting this off because I don't want to have many small
formatting commits, and I don't have any kind of pre-commit hook to do
it for me. So here it is :v
2025-06-01 13:28:06 -05:00
fac607719d Move the CreateResult enum into the releases mod
This thing only needs to exist so Serde can decode the response JSON
properly. I'll either get a success, a missing token, *no body at all
which doesnt' make sense*, or some other ApiError text. In all cases,
the crate::Result is returned. This thing doesn't need to be public.
2025-06-01 11:07:11 -05:00
ee42e09620 Fix API response decoding -- sometimes it's an err
The reqwest might work, but the API still returns an error message.
I forgot about this old hack I had left around because I'm a big dummy.
2025-05-31 22:46:54 -05:00
6d95e54bc7 Transfer impl of release_attach to new home
A bunch of code has been dropped because it's no longer necessary -- yay for better data builder usage and real error handling!
2025-05-29 17:42:26 -05:00
4250deb419 Implement new fn create_release() 2025-05-28 20:27:52 -05:00
36adabb4fd Start our own Error enum 2025-05-27 23:01:49 -05:00
5db1134257 Move CreateReleaseOption to new tree 2025-05-27 20:46:04 -05:00
5f666a8179 Move the Release info structs to new tree 2025-05-27 20:43:39 -05:00
351c4902ae Create new module layout based on Gitea's own 2025-05-27 20:40:13 -05:00
da15506896 Sort derive macros 2025-05-24 17:59:25 -05:00
2705900e10 Lint 2025-05-24 17:59:17 -05:00
80637ca76c Move create-release code to it's own function 2025-05-24 17:56:10 -05:00
26fa57a24f Additional structs & enums for API error responses
Obviously the Gitea API can return errors, which are also JSON strings.
Theres a new error response struct to collect these, and an enum for
Serde to unpack which ever variant happens to come back.
2025-05-24 17:04:08 -05:00
f1da1b508a Releases can now be created... sorta
The API token is read from the environment variable `RELEASE_KEY_GITEA`.
"GITEA" is on the end because Gitea itself will refuse to allow users to
configure Act variables starting with the name "GITEA_".

All information about the release is hard-coded right now. I just needed
to see it hit the API and appear on the Gitea page. Hooking up the extra
options is up next.
2025-05-24 15:14:53 -05:00
8b0f60d348 Wire in the ListReleases primary command
Hey, look at that. I can do the thing what with the stuff and such.
2025-05-24 14:18:38 -05:00
408b0108a5 Starting the Clap CLI parser 2025-05-24 13:52:32 -05:00
4d16f8f292 Add structs to represent API results
So far it's just a pair that work together to do the repo list results.
2025-05-22 18:23:32 -05:00