Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround GH api break around filtering runs by status #36

Merged
merged 5 commits into from
May 4, 2023

Conversation

viveklak
Copy link
Owner

@viveklak viveklak commented May 4, 2023

Looks like the github api has subtly broken filtering workflow runs on certain statuses like waiting.

gh api \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  "/repos/XXX/XXXX/actions/workflows/XXXX/runs?status=waiting&branch=main"
{
  "total_count": 0,
  "workflow_runs": []
}

While setting it to other statuses like cancelled, completed etc. work just fine. (running the above without the status filter returns runs which are in waiting state).

This change uses client side filtering instead.

@viveklak viveklak merged commit 59bbf83 into main May 4, 2023
5 checks passed
@viveklak viveklak deleted the vl/WorkaroundGHAPIBreak branch May 4, 2023 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant