Compare commits
7 commits
61114fe775
...
be924ba9c1
Author | SHA1 | Date | |
---|---|---|---|
be924ba9c1 | |||
911525933b | |||
b061594556 | |||
a8d9b5536e | |||
d03ec7036d | |||
3644ce33b3 | |||
a47ba6c289 |
1 changed files with 8 additions and 6 deletions
|
@ -470,9 +470,11 @@ mod server {
|
||||||
let http_port = server_config.http()?.port();
|
let http_port = server_config.http()?.port();
|
||||||
let webhook_url = server_config.inbound_webhook().base_url();
|
let webhook_url = server_config.inbound_webhook().base_url();
|
||||||
let storage_path = server_config.storage().path();
|
let storage_path = server_config.storage().path();
|
||||||
let notification_webhook_url = server_config
|
let notification = &server_config.notification();
|
||||||
.notification()
|
let notification_webhook_url = notification.webhook_url().unwrap_or_default();
|
||||||
.webhook_url()
|
let notification_webhook_secret = notification
|
||||||
|
.webhook_secret()
|
||||||
|
.map(|secret| secret.expose_secret().clone())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let forge_alias = server_config
|
let forge_alias = server_config
|
||||||
.forges()
|
.forges()
|
||||||
|
@ -523,9 +525,9 @@ url = "{webhook_url}"
|
||||||
[storage]
|
[storage]
|
||||||
path = {storage_path:?}
|
path = {storage_path:?}
|
||||||
|
|
||||||
[notifications]
|
[notification]
|
||||||
type = "Webhook"
|
type = "Webhook"
|
||||||
webhook = {{ url = "{notification_webhook_url}" }}
|
webhook = {{ url = "{notification_webhook_url}", secret = "{notification_webhook_secret}" }}
|
||||||
|
|
||||||
[forge.{forge_alias}]
|
[forge.{forge_alias}]
|
||||||
forge_type = "{forge_type}"
|
forge_type = "{forge_type}"
|
||||||
|
@ -745,7 +747,7 @@ mod given {
|
||||||
InboundWebhook::new(a_name())
|
InboundWebhook::new(a_name())
|
||||||
}
|
}
|
||||||
pub fn an_outbound_webhook() -> OutboundWebhook {
|
pub fn an_outbound_webhook() -> OutboundWebhook {
|
||||||
OutboundWebhook::new(a_name())
|
OutboundWebhook::new(a_name(), a_name())
|
||||||
}
|
}
|
||||||
pub fn a_server_storage() -> ServerStorage {
|
pub fn a_server_storage() -> ServerStorage {
|
||||||
ServerStorage::new(a_name().into())
|
ServerStorage::new(a_name().into())
|
||||||
|
|
Loading…
Reference in a new issue