chore(gerrit-event-streamer): add support for custom usernames
Otherwise, it's pretty weird! Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
parent
a7075182c2
commit
af42f93996
2 changed files with 5 additions and 1 deletions
|
@ -47,7 +47,10 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
|||
.expect("Gerrit event streamer requires Gerrit configuration");
|
||||
let mut gerrit_api = GerritSSHApi::new(
|
||||
gerrit_cfg.ssh_private_key_file,
|
||||
&format!("ssh://{}:{}", gerrit_cfg.instance_uri, gerrit_cfg.ssh_port),
|
||||
&format!(
|
||||
"ssh://{}@{}:{}",
|
||||
gerrit_cfg.username, gerrit_cfg.instance_uri, gerrit_cfg.ssh_port
|
||||
),
|
||||
)
|
||||
.await;
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ pub struct GerritConfig {
|
|||
// For all requests.
|
||||
#[serde(deserialize_with = "deserialize_and_expand_pathbuf")]
|
||||
pub ssh_private_key_file: PathBuf,
|
||||
pub username: String,
|
||||
pub instance_uri: String,
|
||||
#[serde(default = "default_gerrit_ssh_port")]
|
||||
pub ssh_port: u16,
|
||||
|
|
Loading…
Reference in a new issue