Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
schedule:
- cron: '0 0/3 * * *'
push:
branches: [ main, feat/* ]
branches:

env:
CARGO_TERM_COLOR: always
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/tmp
/github-api
12 changes: 10 additions & 2 deletions src/workflows/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,21 @@ impl Summary {
let created_at = run.created_at;
let updated_at = run.updated_at;

// only keep the first run name because repeated run names exist for the
// same sha due to scheduling
let unique_name = {
let mut v = wf.to_vec();
v.sort_by_key(|w| w.run.name.as_str());
v.dedup_by_key(|w| w.run.name.as_str());
v
};
summary.last = Some(LastWorkflow {
created_at,
updated_at,
duration_sec: duration_sec(created_at, updated_at),
// must check all latset data
completed: wf.iter().all(|w| w.run.status == "completed"),
success: wf
completed: unique_name.iter().all(|w| w.run.status == "completed"),
success: unique_name
.iter()
.all(|w| w.run.conclusion.as_deref() == Some("success")),
head_branch: run.head_branch.clone(),
Expand Down