fix(gitea): Fix commit sha param
Some checks failed
build/gitea Building images gitea-package, gitea-pr, gitea-status
build/node-script Building image node-script
build/frp Building image frp
build/base Building image base
build/fluentd Building image fluentd
build/forgejo Building image forgejo
build/beancount-import Building image beancount-import
build/ruby-script Building image ruby-script
build/fava Building image fava
build/gotenberg Building image gotenberg
build/nextcloud Building image nextcloud
build/lua-clib Building image lua-clib
build/python-script Building image python-script
build/rust-xwin Building image rust-xwin
Some checks failed
build/gitea Building images gitea-package, gitea-pr, gitea-status
build/node-script Building image node-script
build/frp Building image frp
build/base Building image base
build/fluentd Building image fluentd
build/forgejo Building image forgejo
build/beancount-import Building image beancount-import
build/ruby-script Building image ruby-script
build/fava Building image fava
build/gotenberg Building image gotenberg
build/nextcloud Building image nextcloud
build/lua-clib Building image lua-clib
build/python-script Building image python-script
build/rust-xwin Building image rust-xwin
This commit is contained in:
parent
0da913ec7c
commit
3ed0626d0d
1 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,6 @@ struct Source {
|
||||||
owner: String,
|
owner: String,
|
||||||
url: Url,
|
url: Url,
|
||||||
repo: String,
|
repo: String,
|
||||||
sha: String,
|
|
||||||
context: String,
|
context: String,
|
||||||
description: Option<String>,
|
description: Option<String>,
|
||||||
target_url: Option<String>,
|
target_url: Option<String>,
|
||||||
|
@ -51,6 +50,7 @@ impl std::fmt::Display for State {
|
||||||
|
|
||||||
#[derive(Deserialize, Serialize, Debug)]
|
#[derive(Deserialize, Serialize, Debug)]
|
||||||
struct Params {
|
struct Params {
|
||||||
|
sha: String,
|
||||||
state: State,
|
state: State,
|
||||||
description: Option<String>,
|
description: Option<String>,
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ fn action_out(conf: Config, _dir: impl AsRef<Path>) -> Result<()> {
|
||||||
// when `join`ing the file name later. Otherwise, the last component
|
// when `join`ing the file name later. Otherwise, the last component
|
||||||
// would be considered a "file" part itself, and replaced by a future `join`.
|
// would be considered a "file" part itself, and replaced by a future `join`.
|
||||||
"api/v1/repos/{}/{}/statuses/{}",
|
"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")?;
|
.wrap_err("Invalid URL")?;
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ fn action_out(conf: Config, _dir: impl AsRef<Path>) -> Result<()> {
|
||||||
StatusCode::CREATED => {
|
StatusCode::CREATED => {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"Created status '{}' on commit '{}'",
|
"Created status '{}' on commit '{}'",
|
||||||
params.state, conf.source.sha
|
params.state, params.sha
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
StatusCode::BAD_REQUEST => {
|
StatusCode::BAD_REQUEST => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue