Commit Graph
73 Commits
Author SHA1 Message Date
robert 6b409c56d4 Change primary arguments
Owner and repo are combined into one string the same way Go dependencies or GitHub Actions are named. `<owner>/<repo>`

Each will be fetched from a matching environment variable if not specified on the command line.
2025-05-24 19:33:21 -05:00
robert 1210b168ee Demo: missing CLI args can be filled via env vars 2025-05-24 19:00:35 -05:00
robert 985c411902 Wire in the release CLI args to the creation fn 2025-05-24 18:47:51 -05:00
robert c5efb0e9f7 Add remaining release creation CLI args 2025-05-24 18:47:35 -05:00
robert 973d9aa6c6 Fix: missing slash between owner and repo 2025-05-24 18:29:49 -05:00
robert 0f4f2ee48f TODO: Serde won't make empty-vec 2025-05-24 18:17:41 -05:00
robert d4ec677b28 Internal-ize API endpoint assembly for create-release 2025-05-24 18:15:01 -05:00
robert 2c9cd5b958 Move list-releases code to its own function 2025-05-24 18:13:39 -05:00
robert f7ba2e99aa Assemble fragments to get API endpoint 2025-05-24 18:13:10 -05:00
robert da15506896 Sort derive macros 2025-05-24 17:59:25 -05:00
robert 2705900e10 Lint 2025-05-24 17:59:17 -05:00
robert 80637ca76c Move create-release code to it's own function 2025-05-24 17:56:10 -05:00
robert 19cb224598 Hook up the new deserialization structs 2025-05-24 17:07:08 -05:00
robert 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
robert 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
robert f31f5b49da Move the URL and HTTP Client out of match block
I'm going to need these in several of the arms.
2025-05-24 14:53:16 -05:00
robert 013c797e1f Drop nested list variable in command
The enum variant is the value this code-path requires. The inner bool doesn't do anything, so it can go away.
2025-05-24 14:31:07 -05:00
robert 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
robert 408b0108a5 Starting the Clap CLI parser 2025-05-24 13:52:32 -05:00
robert 2067964a80 Demo use of JSON deserialization
It Just Works. Praise the Rust macros.
2025-05-22 18:23:32 -05:00
robert 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
robert 45b5049d0e Slapdash API call demo
I can hit the endpoint and retrieve data. Excellent.
2025-05-22 18:23:32 -05:00
robert 3171c89248 Initial commit
Starting up a new project for interfacing with Gitea's API from the
command line.
2025-05-22 18:22:05 -05:00