1

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"})
2
  • What do you mean with "it does not work as expected"? Are you getting an error? If so, please add it to your question. Commented Oct 17, 2022 at 10:37
  • I am not getting any error but the filter for date(created) does not work. i can see workflows with date 2022-08-02T09:29:07Z as well. Commented Oct 17, 2022 at 10:39

1 Answer 1

1

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

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.