Radish alpha
r
rad:zwTxygwuz5LDGBq255RA2CbNGrz8
Radicle CI broker
Radicle
Git
fix: serialize only the adapter config, not the adapter spec
Lars Wirzenius committed 10 months ago
commit 073b652f7ce88ddcf63493d6db52d94356bea1cc
parent ccfa861
2 files changed +1 -2
modified ci-broker.md
@@ -446,7 +446,6 @@ when I run ./env.sh cib --config broker.yaml process-events

then stderr contains "RADICLE_NATIVE_CI="
then stderr contains "foo: bar"
-
then stderr contains "API_KEY: xyzzy"

when I run cibtool --db ci-broker.db event list
then stdout is empty
modified src/adapter.rs
@@ -120,7 +120,7 @@ impl Adapter {
    fn write_adapter_config(&self, tmpdir: &TempDir) -> Result<PathBuf, AdapterError> {
        let filename = tmpdir.path().join("adapter.yaml");

-
        let yaml = serde_yml::to_string(self).map_err(AdapterError::AdapterConfigToYaml)?;
+
        let yaml = serde_yml::to_string(&self.config).map_err(AdapterError::AdapterConfigToYaml)?;
        logger::adapter_temp_config(&filename, &yaml);
        std::fs::write(&filename, yaml.as_bytes()).map_err(AdapterError::AdapterConfigWrite)?;