Repository navigation
Conversation
list_code_scanning_alerts and list_secret_scanning_alerts returned bare
JSON arrays while list_dependabot_alerts uses {alerts, pageInfo}. Wrap
both list text and typed outputs in the same object shape, and set
pageInfo.hasNextPage/hasPreviousPage from REST Link headers for
page/per_page pagination.
Fixes github#3439
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make
list_code_scanning_alertsandlist_secret_scanning_alertsreturn{ "alerts": [...], "pageInfo": {...} }so they matchlist_dependabot_alertsand clients can consume security list tools uniformly.Why
Fixes #3439
Code Scanning and Secret Scanning list tools returned a bare JSON array while Dependabot already returned an object with
alertsandpageInfo. Consumers that expect the Dependabot shape can miss real findings.What changed
{alerts, pageInfo}.CodeScanningAlertsOutput/SecretScanningAlertsOutput(same shape as Dependabot).pageInfo.hasNextPage/hasPreviousPagefrom REST Link headers viabuildOffsetPageInfofor page/per_page pagination.MCP impact
List text and modern structured output for the two tools become objects instead of bare arrays (breaking for clients that assumed an array root). Output schemas now describe
{alerts, pageInfo}.Prompts tested (tool changes only)
{alerts, pageInfo}; Linkrel=nextsetshasNextPage=true.Security / limits
Same alerts and IFC labeling; only response envelope and pagination metadata changed.
Tool renaming
deprecated_tool_aliases.goLint & tests
./script/lint./script/testFocused:
go test ./pkg/github/ -run 'Security|CodeScanning|SecretScanning|Dependabot|Advisory'(pass). Toolsnaps updated withUPDATE_TOOLSNAPS=true.Docs
AI-assisted: drafted with coding-agent help; changes and tests reviewed by the author.