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.
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.