Skip to content

feat: add Code Quality finding type with comment-on-issue workflow#159

Open
jvdprng wants to merge 5 commits intomainfrom
jvdp/code-quality
Open

feat: add Code Quality finding type with comment-on-issue workflow#159
jvdprng wants to merge 5 commits intomainfrom
jvdp/code-quality

Conversation

@jvdprng
Copy link
Copy Markdown
Member

@jvdprng jvdprng commented Feb 23, 2026

Code Quality is a new value in the FindingType enum. When a finding has type severity "Code Quality", the details panel hides severity type, difficulty, exploit scenario, and recommendation fields. The "Open Remote Issue" flow posts a comment on a single designated GitHub issue instead of creating a new issue per finding. The CQ issue number is stored per-workspace-root, shared across sibling roots with the same audit repo, and editable from both the command palette and the Repository Configuration panel.

Implements #156

Code Quality is a new value in the FindingType enum. When a finding has
type "Code Quality", the details panel hides severity, difficulty, exploit
scenario, and recommendation fields. The "Open Remote Issue" flow posts
a comment on a single designated GitHub issue instead of creating a new
issue per finding. The CQ issue number is stored per-workspace-root,
shared across sibling roots with the same audit repo, and editable from
both the command palette and the Repository Configuration panel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

// If no CQ issue number is set, prompt the user
if (wsRoot.codeQualityIssueNumber === undefined) {
const choice = await vscode.window.showQuickPick(["Enter existing issue number", "Create a new issue"], {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have a title and probably ignoreFocusOut = true to prevent panel closing when the user is looking around for the issue number. Same for the other new quickpick menus

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


if (!skipConfirmation) {
// Prompt the user before copying and opening, consistent with the too-long-URL fallback in openGithubIssue
const action = await vscode.window.showInformationMessage(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This box should have a button that opens the correct setting

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Also explains why the button is there.

- Add title and ignoreFocusOut to CQ QuickPick menus for consistency
- Add "Open Settings" button to CQ confirmation dialog
- Move CodeQuality from FindingType to FindingSeverity so selecting it
  in the first dropdown naturally hides subsequent fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
}

await vscode.env.clipboard.writeText(commentBody);
const issuePageUrl = `${wsRoot.gitRemote}/issues/${wsRoot.codeQualityIssueNumber}#sr-footer-heading`;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this will only work on GitHub?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitLab support added and tested (once)

jvdprng and others added 2 commits March 13, 2026 03:33
…prompt

Move Code Quality before Informational in the severity dropdown and
add explanatory text to the confirmation dialog so users understand
why the Settings button is there.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… support

The "Create a new issue" path fell through into the "Enter existing
issue number" input, causing two consecutive prompts. Wrapping the
second path in an `else` clause fixes this.

Also adds GitLab issue URL support (using /-/issues/ path format)
alongside the existing GitHub URL handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pbottine
Copy link
Copy Markdown
Contributor

Nice, I like the workflow. Note that the description above states

finding has type "Code Quality"

But the "Code Quality" drop down option is actually under severity, not type.

@jvdprng
Copy link
Copy Markdown
Member Author

jvdprng commented Mar 19, 2026

Yeah, that was one of the changes Filipe requested. It originally was under Type but Severity makes more sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants