You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix pull request comment rendering and disable flags (#322)
* Fix orphaned tags and empty tables in PR comments
A whitespace-only line closes a CommonMark HTML block. Optional sections that
rendered as empty left one behind inside the alerts table, so the indented
closing tags after it were rendered as a literal code block reading
`</blockquote></details>` instead of markup.
- Drop blank lines from generated comment markup and keep indentation below the
four spaces that start a code block.
- Collapse alert descriptions, suggestions and license findings onto a single
line so multi-line API text cannot break the table either.
- Replace the comment body with a short confirmation when no alerts are left to
report, instead of keeping the caution banner above a table with no rows. The
comment marker is preserved so the same comment is updated later.
- Apply ignore-all to the pre-2.0.55 Markdown table format. The check was made
once per ignore command and an ignore-all comment produces none, so no rows
were removed.
Bumps to 2.6.8.
* Make --disable-security-issue and --disable-overview suppress comments
Both flags were checked only after testing whether a comment of that type was
already on the pull request, so they suppressed the first post and then updated
that comment on every later run. --disable-security-issue in particular kept
refreshing an existing comment with the full alerts table.
The flags now mean the CLI does not manage that comment at all. An existing
comment is left untouched rather than rewritten, since a body claiming no alerts
would be inaccurate when reporting is merely switched off.
Moves the decision into should_write_comment() so it is covered by tests
directly; main_code() had no harness for this block.
Bumps to 2.7.0 rather than a patch, since these flags change behavior.
0 commit comments