Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

github api : List workflow runs with created and status parameters

I am trying to list Lists all workflow runs for a repository with parameters created and status also i am using per_page. I am using below url but it doss not work as expected. It does not throw any error but the filter for date(created)does not work. I can see workflows with date 2022-08-02T09:29:07Z as well.
But i am trying to do it in python as well

curl \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <TOKEN>" \
  https://<base url>/api/v3/repos/<org>/<repo>/actions/runs\
  ?q=status:completed+created:>=2022-10-10&per_page=100

import requests
u= f"https://<base url>/api/v3/repos/<org>/<repo>/actions/runs?q=status:completed+created:>=2022-10-10&per_page=100"

res = requests.get(u, headers={"Authorization": "Bearer <TOKEN>",
         "Accept": "application/vnd.github+json"})

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

From the docs, it looks like created should be a query parameter itself.

Try: runs?status=completed&created=>=2022-10-10&per_page=100

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading