Add GitHub review filters and exports - #14
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds severity-based filtering, trust labeling, and export/copy helpers to the Workspace Guard .github review experience in the VS Code extension.
Changes:
- Introduces
.githubreview trust levels/labels and a severity filter for reports. - Adds VS Code commands/UI actions to set the filter and export the review as JSON/Markdown.
- Adds remediation snippet extraction and a “copy patch snippet” action.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/githubReviewPresentation.test.ts | Adds tests for trust labeling, filtering, and Markdown export formatting. |
| tests/githubRemediation.test.ts | Adds test coverage for retrieving remediation patch snippets. |
| src/vscodeExtension.ts | Implements filter persistence, filtered tree rendering, export commands, and snippet copy action. |
| src/extension/githubReviewPresentation.ts | Adds trust-level logic, report filtering, and Markdown export formatter. |
| src/extension/githubRemediation.ts | Exposes a helper to return the remediation snippet when available. |
| README.md | Documents filter/export capabilities in the review view. |
| package.json | Contributes new commands and view actions + activation events. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+149
to
+155
| const filteredVisibleEntries = filteredEntries.filter(({ fullReport, filteredReport }) => { | ||
| if (this.filter === "all") { | ||
| return true; | ||
| } | ||
|
|
||
| return filteredReport.findings.length > 0 || fullReport.findings.length === 0; | ||
| }); |
Comment on lines
+175
to
+178
| return [{ | ||
| kind: "empty", | ||
| label: element.filter === "all" ? "No findings" : `No ${element.filter} findings`, | ||
| description: element.filter === "all" |
| const reports = githubReviewTreeProvider.getReports(); | ||
| const filter = githubReviewTreeProvider.getFilter(); | ||
| const filteredReports = reports.map((report) => filterGithubMetadataReport(report, filter)); | ||
| const summary = summarizeGithubMetadataReports(filteredReports); |
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\n- add severity filtering and trust summary to the Explorer review\n- add JSON and Markdown export commands for .github review results\n- allow copying remediation snippets directly from the finding flow\n\n## Validation\n- npm test\n- npm run build\n- npm run package:extension -- --out /tmp/workspace-guard-filter-export.vsix