Skip to content

Migrate PR issues to new flattened API with server-side filters#270

Merged
jai-deepsource merged 6 commits intomasterfrom
ai-pr-issues
Mar 2, 2026
Merged

Migrate PR issues to new flattened API with server-side filters#270
jai-deepsource merged 6 commits intomasterfrom
ai-pr-issues

Conversation

@jai-deepsource
Copy link
Contributor

  • Switch from issueOccurrences to issues field in PR issues GraphQL query
  • Flatten response structure, remove nested issue/analyzer objects
  • Add source, category, severity, and q filter params to PR issues query
  • Add buildPRFilters() to map CLI flags to server-side filter params
  • Update GetPRIssues signature to accept filter params
  • Update golden files and tests to match new schema

- Switch from `issueOccurrences` to `issues` field in PR issues GraphQL query
- Flatten response structure, remove nested issue/analyzer objects
- Add source, category, severity, and q filter params to PR issues query
- Add buildPRFilters() to map CLI flags to server-side filter params
- Update GetPRIssues signature to accept filter params
- Update golden files and tests to match new schema
@deepsource-io
Copy link

deepsource-io bot commented Mar 2, 2026

DeepSource Code Review

We reviewed changes in 093ba87...b6c9f87 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Coverage  

Code Review Summary

Analyzer Status Updated (UTC) Details
Go Mar 2, 2026 8:13p.m. Review ↗
Secrets Mar 2, 2026 8:13p.m. Review ↗
Test coverage Mar 2, 2026 8:13p.m. Review ↗

Code Coverage Summary

Language Line Coverage (New Code) Line Coverage (Overall)
Aggregate
4.5%
19.2%
[▼ down 0.2% from master]
Go
4.5%
[⤫ below threshold]
19.2%
[▼ down 0.2% from master]
[✓ above threshold]

➟ Additional coverage metrics may have been reported. See full coverage report ↗

- Return early when issuesList is nil to avoid passing nil to filterIssues
- Suggest checking if branch has been pushed/analyzed when no runs exist
- Replace generic "no completed runs" with "analysis still in progress"
- Point users to --default-branch as a fallback option
- Update test assertions to match new message text
- Add Fallback field to AutoBranchResult to track when results come
  from a previous completed run while a new analysis is in progress
- Propagate fallback state to issues, metrics, and vulnerabilities commands
- Skip "no results found" message in fallback mode since it's misleading
  when the data is from an older run, not the current commit
@jai-deepsource jai-deepsource merged commit fccfbea into master Mar 2, 2026
4 of 5 checks passed
@jai-deepsource jai-deepsource deleted the ai-pr-issues branch March 2, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant