Skip to content

GitHub workflow runs are sorted by update date #4

Description

@haykam821

If two workflow runs targeting different commits are triggered in quick succession, and the workflow run based on the old commit finishes last, then the artifact chosen will be based on the old commit.

The sorting logic should be improved to handle this case:

let mut workflow_runs = client.get_workflow_runs(owner, repository).await?.workflow_runs;
workflow_runs.sort_by_key(|run| cmp::Reverse(run.updated_at));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions