-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
ListAlertsForOrg options should support cursor pagination #2511
Comments
According to the docs here: https://docs.github.com/en/rest/code-scanning#list-code-scanning-alerts-for-an-organization So unfortunately, this is not a simple replacement, and #2512 would be a breaking API change that would confuse anybody currently using the This is going to need some discussion as how to correctly solve this situation. |
But at the same time docs says that both pages and cursors are allowed so isn't [edit] I see now, there is |
Did some digging and looks like that the only endpoint in the whole API that accepts Therefore, it may make sense to create a new type of Also, |
Yikes! That is a bit disturbing, @jporzucek - thank you for the research! Would you mind contacting GitHub tech support and explaining the situation to them and see if they have a recommendation for us here in this repo? Feel free to point to this issue that you started. |
This seems to be a consistent issue across GitHub's API. I had just recently resolved this issue for Secret Scan Alerts #2446 |
Ah, right... thank you for the reminder, @AbbanMustafa ! @jporzucek - could you please do something similar to #2446 ? |
I brought back I'm also in touch with GitHub Support so we're sure what type of pagination is indeed supported on that endpoint. Will let you know here once I got a final response. |
At the moment
ListAlertsForOrg
function supports only offset (page
) pagination while querying REST API https://api.github.com/orgs/ORG/code-scanning/alerts endpoint returnslink
header withafter
query parameter. Therefore, theAlertListOptions
struct should includeListCursorOptions
field.The text was updated successfully, but these errors were encountered: