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 => {