diff options
author | Vincent Ambo <tazjin@tvl.su> | 2023-11-26T22·18+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-11-27T21·50+0000 |
commit | 623805cecd90a62089d3ec5dbe615c737231698a (patch) | |
tree | 8b635337e5627f00b329943b4e06894784893e5a /ops/gerrit-autosubmit/Cargo.toml | |
parent | 360c98ce38a8eb94ab3955f4ed46c3a2e709bb74 (diff) |
feat(ops/gerrit-autosubmit): init simple gerrit autosubmitter r/7077
Adds a small Rust program that connects to the Gerrit API and uses a simple algorithm to figure out which changes should be submitted, and submits them: * it fetches all changes the Gerrit query API considers submittable (i.e. all requirements fulfilled), and that have the `Autosubmit` label set * it filters these changes down to those that are _actually_ submittable (in Gerrit API terms: that have an active Submit button) * it filters out those that would submit ancestors that are *not* marked with the `Autosubmit` label * it submits the longest chain After that it just loops. There is no rebasing logic yet for when it "runs out" of submittable changes, but it will not be difficult to add. Relates to b/333. Change-Id: Ib91ecf2c45b178e8c64ff7b2174d617d4c45efe2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10131 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com> Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'ops/gerrit-autosubmit/Cargo.toml')
-rw-r--r-- | ops/gerrit-autosubmit/Cargo.toml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ops/gerrit-autosubmit/Cargo.toml b/ops/gerrit-autosubmit/Cargo.toml new file mode 100644 index 000000000000..fa51614a0869 --- /dev/null +++ b/ops/gerrit-autosubmit/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "gerrit-autosubmit" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow = "1.0.75" +crimp = "4087.0.0" +serde = { version = "1.0.193", features = ["derive"] } +serde_json = "1.0.108" |