Skip to content

Commit c300b15

Browse files
Run CLA retry after any workflow completion
1 parent c8413c2 commit c300b15

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/retry-cla-assistant.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ name: Retry CLA Assistant
1111
on:
1212
pull_request_target:
1313
types: [opened, reopened, synchronize, ready_for_review]
14+
workflow_run:
15+
types: [completed]
1416
schedule:
1517
- cron: "7,22,37,52 * * * *"
1618

tools/ci/src/retry_cla_assistant.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,19 @@ fn candidate_pull_requests(client: &GithubClient, owner: &str, repo: &str, pr_nu
8686
pr_numbers.insert(number);
8787
}
8888
}
89+
"workflow_run" => {
90+
if event.pointer("/workflow_run/name").and_then(Value::as_str) == Some("Retry CLA Assistant") {
91+
println!("Ignoring completion of this workflow.");
92+
return Ok(Vec::new());
93+
}
94+
if let Some(prs) = event.pointer("/workflow_run/pull_requests").and_then(Value::as_array) {
95+
for pr in prs {
96+
if let Some(number) = pr.get("number").and_then(Value::as_u64) {
97+
pr_numbers.insert(number);
98+
}
99+
}
100+
}
101+
}
89102
"workflow_dispatch" => {}
90103
other => println!("Unsupported event {other}; skipping."),
91104
}

0 commit comments

Comments
 (0)