comment once on a merged config pr when its swarm build fails
This commit is contained in:
parent
c28ca7aab5
commit
0bc5a7e475
1 changed files with 460 additions and 22 deletions
|
|
@ -73,11 +73,13 @@ struct WebhookBranch {
|
|||
sha: Option<String>,
|
||||
}
|
||||
|
||||
/// A config PR that was just merged: whose config, and the commit to deploy.
|
||||
/// A config PR that was just merged: whose config, the commit to deploy, and
|
||||
/// the PR.
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct MergedConfigPr {
|
||||
pub agent: String,
|
||||
pub rev: String,
|
||||
pub pr: u64,
|
||||
}
|
||||
|
||||
/// The merge a verified `ConfigPr` delivery reports, if it reports one.
|
||||
|
|
@ -108,6 +110,7 @@ pub fn merged(body: &[u8]) -> Option<MergedConfigPr> {
|
|||
Some(MergedConfigPr {
|
||||
agent: payload.repository.name,
|
||||
rev,
|
||||
pr: payload.pull_request.number,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -373,6 +376,7 @@ mod tests {
|
|||
Some(super::MergedConfigPr {
|
||||
agent: "damocles".to_owned(),
|
||||
rev: "abc123".to_owned(),
|
||||
pr: 5,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue