docs
docs copied to clipboard
Phrase is not present in links for audit log pagination
Code of Conduct
- [x] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise
What changes are you suggesting?
In example 1, the request is
curl --include -H "Authorization: Bearer TOKEN" \
--request GET \
"https://api.github.com/enterprises/avocado-corp/audit-log?phrase=created:2022-01-01&per_page=100"
Note that phrase=created:2022-01-01 is provided, as well the per_page field.
However, in the response example with the links the content is:
link: <https://api.github.com/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=MS42NjQzODMzNTk5MjdlKzEyfDloQzBxdURzaFdVbVlLWjkxRU9mNXc%3D&before=>; rel="next",
<https://api.github.com/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=&before=>; rel="first",
<https://api.github.com/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=&before=MS42Njc4NDA2MjM4MzNlKzEyfExqeG5sUElvNEZMbG1XZHA5akdKTVE%3D>; rel="prev"
Getting one of the links:
https://api.github.com/enterprises/13827/audit-log?%3A2022-11-01=&per_page=100&after=MS42NjQzODMzNTk5MjdlKzEyfDloQzBxdURzaFdVbVlLWjkxRU9mNXc%3D&before
it seems an invalid URL, as 2022-11-01 is provided with an url encoded : where it should be with phrase%3A2022-11-01 including the name of the query parameter used.
Also, for consistency date should be 2022-01-01 as it is the one provided in the request.
So the link, once fixed should be:
https://api.github.com/enterprises/13827/audit-log?phrase%3A2022-11-01=&per_page=100&after=MS42NjQzODMzNTk5MjdlKzEyfDloQzBxdURzaFdVbVlLWjkxRU9mNXc%3D&before
Additional information
No response
Thanks for opening an issue! I'll get this triaged for review.
Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert :eyes:
❤️
明白了,原本是完全新手小白 很抱歉造成你的困擾
@khnumdev I've confirmed that this change is fine, so if you want to open a PR, feel free. Or someone else can.
@khnumdev I've confirmed that this change is fine, so if you want to open a PR, feel free. Or someone else can.
Thanks! Yeah I'll provide a PR for this. Do I need to assign the issue to me for that ?
@khnumdev No, just note the issue number (#38566) under the question of which issue it closes in the PR template. Even that isn't strictly necessary, it just links them so the issue gets closed when the PR gets merged. If it messes up for any reason, I can always close the issue manually.