[GitHub Actions API] Date range syntax not working for query parameter
@nickfloyd đang làm issue này rồi.
Từ ngày 6/11/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
What part(s) of the article would you like to see updated?
Under List workflow runs for a repository, for the query parameter created, the date range syntax has been linked i.e. Query for dates:
# syntax
created:<START-DATE>..<END-DATE>
# example
created:2023-02-10..2023-02-12
But, this doesn't work.
The syntax that works is with =:
created=<START-DATE>..<END-DATE>
created=2023-02-10..2023-02-12
Example
Tested with a public repo like this (created:2023-02-12..2023-02-13):
curl \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/iamazeem/test/actions/runs?created:2023-02-12..2023-02-13" \
| jq .total_count
# output: 8
Also, tested with other ranges and it always returns the total number of workflows runs i.e. 8 (at the time of writing).
However, it returns the correct number of workflows when tested with = (created=2023-02-12..2023-02-13):
curl \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/iamazeem/test/actions/runs?created=2023-02-12..2023-02-13" \
| jq .total_count
# output: 3
The same has been tested and verified with multiple ranges with : and =.
And, = always work.
Seems like the syntax with : works for GitHub directly:
https://github.com/search?utf8=%E2%9C%93&q=cats+pushed%3A2016-04-30..2016-07-04&type=Repositories
But, it doesn't work for GHA API.
Maybe, the article needs to be updated or the link needs to be fixed.
Additional information
No response
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 1.6k
- Fork
- 342
- Merge trung bình
- 3 giờ 33 phút
- Pull request đã merge (30 ngày)
- 51
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/rest-api-description
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
github/rest-api-description#7201 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/rest-api-description#7163 ·
-
Runner deprecations: registration_deprecates_at is declared on the response but never returned Đang mởfeature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/rest-api-description#7162 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/rest-api-description#7135 ·
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
github/rest-api-description#7111 · 1 bình luận ·