Skip to content

Conversation

@ajhofmann
Copy link
Contributor

No description provided.

start = jobs.min_by{|job| job["started_at"]}["started_at"]
finish = jobs.max_by{|job| job["completed_at"]}["completed_at"]
status = jobs.all?{|job| job["conclusion"] == "success"} ? "success" : "failure"
status = jobs.all?{|job| ["success", "skipped"].include? job["conclusion"]} ? "success" : "failure"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any benefit in tracking "skipped" status separately?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thin workflows would have at least one job run, so I'm not sure we would ever get a fully skipped workflow.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Makes sense.

@ajhofmann ajhofmann merged commit a020b9b into main Feb 23, 2021
@ajhofmann ajhofmann deleted the adamh/status-patch branch February 23, 2021 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants