-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(contrib): add badge uservice #4335
Conversation
Signed-off-by: Benjamin Coenen <[email protected]>
project_key -> Text, | ||
workflow_name -> Text, | ||
branch -> Nullable<Text>, | ||
status -> Text, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use diesel-derive-enum to store status as enum
#[derive(Default, Debug, Deserialize, Serialize, Clone)] | ||
#[serde(default)] | ||
pub struct BadgeConfiguration { | ||
pub url: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use url::Url with the feature serde to load and implicit check the given url
} | ||
|
||
#[derive(Default, Debug, Deserialize, Serialize, Clone)] | ||
pub struct HTTPConfiguration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be replaced by std::net::SocketAddr which implement Serialize & Deserialize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http_server(state: WebState, http_bind: String, http_port: String) ======> http_server(state: WebState, addr: SocketAddr)
with format!("{}:{}", http_bind, http_port).into()
Signed-off-by: Benjamin Coenen <[email protected]>
Signed-off-by: Benjamin Coenen [email protected]
close feat (contrib/uservices): github badges #546
@ovh/cds