Skip to content

Release code-scan-action v0.1.8#12

Merged
mldangelo merged 1 commit into
mainfrom
release/code-scan-action-v0.1.8
Jun 16, 2026
Merged

Release code-scan-action v0.1.8#12
mldangelo merged 1 commit into
mainfrom
release/code-scan-action-v0.1.8

Conversation

@promptfoobot

@promptfoobot promptfoobot Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Automated release mirror for @promptfoo/code-scan-action v0.1.8.

Source: promptfoo/promptfoo@af7ec0b
Source tag: code-scan-action-0.1.8

This PR is generated from the monorepo release workflow. The mirror repository validation workflow rebuilds from .release-source.json and checks that the generated artifacts match.

@mldangelo mldangelo merged commit 148e01f into main Jun 16, 2026
3 checks passed
@mldangelo mldangelo deleted the release/code-scan-action-v0.1.8 branch June 16, 2026 17:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ca28f31c2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread dist/index.js
Comment on lines +46718 to +46719
} else if (line.startsWith("+") || line.startsWith(" ") || line === "") {
currentNewLine++;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Do not count the terminal diff newline as reviewable

In normal PR diffs the response ends with \n, so split('\n') produces a final empty string. Treating that sentinel as a hunk line extends the last file's final range one line past the actual diff; when the scanner reports a line after the last hunk, clampToValidLine can keep or clamp it to this nonexistent review line, causing createReview to reject the fallback review instead of converting the finding to a general comment.

Useful? React with 👍 / 👎.

Comment thread dist/index.js
let currentNewLine = 0;
let hunkStartLine = 0;
for (const line of lines) {
const fileMatch = line.match(/^\+\+\+ b\/(.+)$/);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Strip diff header metadata from spaced paths

For PRs that touch files whose paths contain spaces, git-style unified diffs terminate the +++ b/<path> header with a tab separator, so this regex stores a key like "dir/a b\t" while scanner/GitHub comment paths are "dir/a b". Those comments will never match validRanges, so the fallback path converts otherwise valid inline findings for these files into general comments instead of posting them on the affected lines.

Useful? React with 👍 / 👎.

Comment thread dist/index.js
Comment on lines +46804 to +46807
return {
startLine: clampedStartLine,
line: clampedEndLine
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep multi-line comments within one diff hunk

When a finding spans two separated hunks in the same file, clamping the start and end independently can return a multi-line review comment whose range crosses hidden, non-diff lines. GitHub cannot create that review thread, so a single cross-hunk finding makes the fallback createReview call fail instead of degrading to a single-line or general comment.

Useful? React with 👍 / 👎.

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.

1 participant