From 3ed0626d0d759452f090afa80e17d75113d838a6 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 28 Aug 2024 11:24:34 +0200 Subject: [PATCH] fix(gitea): Fix commit sha param --- images/gitea/src/cmd/status.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/gitea/src/cmd/status.rs b/images/gitea/src/cmd/status.rs index 8c68f09..40c35b9 100644 --- a/images/gitea/src/cmd/status.rs +++ b/images/gitea/src/cmd/status.rs @@ -21,7 +21,6 @@ struct Source { owner: String, url: Url, repo: String, - sha: String, context: String, description: Option, target_url: Option, @@ -51,6 +50,7 @@ impl std::fmt::Display for State { #[derive(Deserialize, Serialize, Debug)] struct Params { + sha: String, state: State, description: Option, } @@ -76,7 +76,7 @@ fn action_out(conf: Config, _dir: impl AsRef) -> Result<()> { // when `join`ing the file name later. Otherwise, the last component // would be considered a "file" part itself, and replaced by a future `join`. "api/v1/repos/{}/{}/statuses/{}", - conf.source.owner, conf.source.repo, conf.source.sha + conf.source.owner, conf.source.repo, params.sha )) .wrap_err("Invalid URL")?; @@ -97,7 +97,7 @@ fn action_out(conf: Config, _dir: impl AsRef) -> Result<()> { StatusCode::CREATED => { eprintln!( "Created status '{}' on commit '{}'", - params.state, conf.source.sha + params.state, params.sha ); } StatusCode::BAD_REQUEST => {