-
Notifications
You must be signed in to change notification settings - Fork 18
performance: switch to object-based cursor from offset-based page cursors #86
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,7 @@ def list_repo_cs_alerts(api_endpoint, github_pat, repo_name): | |
| Outputs: | ||
| - List of _all_ code scanning alerts on the repository | ||
| """ | ||
| url = f"{api_endpoint}/repos/{repo_name}/code-scanning/alerts?per_page=100&page=1" | ||
| url = f"{api_endpoint}/repos/{repo_name}/code-scanning/alerts?per_page=100&after=" | ||
|
||
| code_scanning_alerts = api_helpers.make_api_call(url, github_pat) | ||
| print(f"Found {len(code_scanning_alerts)} code scanning alerts in {repo_name}") | ||
| return code_scanning_alerts | ||
|
|
@@ -104,7 +104,7 @@ def list_org_cs_alerts(api_endpoint, github_pat, org_name): | |
| - List of _all_ code scanning alerts on the organization | ||
| """ | ||
|
|
||
| url = f"{api_endpoint}/orgs/{org_name}/code-scanning/alerts?per_page=100&page=1" | ||
| url = f"{api_endpoint}/orgs/{org_name}/code-scanning/alerts?per_page=100&after=" | ||
| code_scanning_alerts = api_helpers.make_api_call(url, github_pat) | ||
| print(f"Found {len(code_scanning_alerts)} code scanning alerts in {org_name}") | ||
| return code_scanning_alerts | ||
|
|
@@ -306,7 +306,7 @@ def list_enterprise_cloud_cs_alerts(api_endpoint, github_pat, enterprise_slug): | |
| - List of _all_ code scanning alerts in enterprise that PAT user can access | ||
| """ | ||
|
|
||
| url = f"{api_endpoint}/enterprises/{enterprise_slug}/code-scanning/alerts?per_page=100&page=1" | ||
| url = f"{api_endpoint}/enterprises/{enterprise_slug}/code-scanning/alerts?per_page=100&after=" | ||
| code_scanning_alerts = api_helpers.make_api_call(url, github_pat) | ||
| print(f"Found {len(code_scanning_alerts)} code scanning alerts in {enterprise_slug}") | ||
| return code_scanning_alerts | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,7 @@ def list_repo_dependabot_alerts(api_endpoint, github_pat, repo_name): | |
| Outputs: | ||
| - List of _all_ dependency alerts on the repository | ||
| """ | ||
| url = f"{api_endpoint}/repos/{repo_name}/dependabot/alerts?per_page=100&page=1" | ||
| url = f"{api_endpoint}/repos/{repo_name}/dependabot/alerts?per_page=100&after=" | ||
felickz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| dependabot_alerts = api_helpers.make_api_call(url, github_pat) | ||
| print(f"Found {len(dependabot_alerts)} dependabot alerts in {repo_name}") | ||
| return dependabot_alerts | ||
|
|
@@ -90,7 +90,7 @@ def list_org_dependabot_alerts(api_endpoint, github_pat, org_name): | |
| Outputs: | ||
| - List of _all_ dependency alerts on the organization | ||
| """ | ||
| url = f"{api_endpoint}/orgs/{org_name}/dependabot/alerts?per_page=100&page=1" | ||
| url = f"{api_endpoint}/orgs/{org_name}/dependabot/alerts?per_page=100&after=" | ||
| dependabot_alerts = api_helpers.make_api_call(url, github_pat) | ||
| print(f"Found {len(dependabot_alerts)} dependabot alerts in {org_name}") | ||
| return dependabot_alerts | ||
|
|
@@ -109,7 +109,7 @@ def list_enterprise_dependabot_alerts(api_endpoint, github_pat, enterprise_slug) | |
| Outputs: | ||
| - List of _all_ dependency alerts on the enterprise | ||
| """ | ||
| url = f"{api_endpoint}/enterprises/{enterprise_slug}/dependabot/alerts?per_page=100&page=1" | ||
| url = f"{api_endpoint}/enterprises/{enterprise_slug}/dependabot/alerts?per_page=100&after=" | ||
| dependabot_alerts = api_helpers.make_api_call(url, github_pat) | ||
| print(f"Found {len(dependabot_alerts)} dependabot alerts in {enterprise_slug}") | ||
| return dependabot_alerts | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.