fix "cibtool trigger", and Request::commit
cibtool trigger created a “ref changed” event without a base commit.
This meant that the rest of the CI broker couldn’t construct a list of
commits since the base commit, which meant it could not create a
Request::Trigger message to the CI adapter. This meant that cibtool trigger was useless. Fix that by making sure the base commit is
added: either the parent commit of the what is specified with
--commit or that commit itself, if there is no parent commit.
Request::commit has always been fallible, but previously it has not
returned a Result, and instead if anything went wrong, it panicked.
Panics are not good, so change the method to return a Result
instead. That’s a breaking change: callers will now have to handle the
result.
2 files changed
+27
-6
a3fbb6e0
→
17828919
modified src/bin/cibtool.rs
@@ -770,7 +770,9 @@ impl TriggerCmd {
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified src/msg.rs
@@ -264,11 +264,14 @@ impl<'a> RequestBuilder<'a> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -315,7 +318,7 @@ impl Request {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -323,11 +326,19 @@ impl Request {
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
@@ -698,6 +709,14 @@ pub enum MessageError {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|