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
{{ message }}
Repository navigation
Summary labels policy-routed findings as 'GitHub could not post this as an inline comment' #2071
When route_severity_below or route_categories moves a finding to the sticky summary, the summary labels it as a posting failure:
⚠️ GitHub could not post this as an inline comment: Routed to summary (severity medium · category bug)
GitHub didn't fail to post anything. The publication policy routed the finding on purpose. Readers take the warning to mean the run partly failed.
Where
scripts/github-actions/post-review-comments.js on main:
formatSummaryComment (about line 2407) prints ⚠️ GitHub could not post this as an inline comment: ${error} for every summary entry that has a reason.
routeFinding (about line 2364) passes Routed to summary (…) as that reason, so routed findings get the failure wording.
The no-line case (NO_LINE_REASON) uses the same line on purpose. It isn't a GitHub failure either.
Reproduce
Action v1.14.0 with route_severity_below: medium on a PR that yields a medium finding. The summary shows the warning above with Comments routed: 1 and Comments failed: 0.
Suggested fix
Use a different line per cause, for example:
routed: ℹ️ Routed to the summary by policy (severity medium · category bug), or just the badge with no line;
no line info: ℹ️ No line range, so shown here;
real failures: keep ⚠️ GitHub could not post this as an inline comment: <error>.
The counters already tell routed and failed apart (comments_routed and comments_failed). Only the per-finding line merges them.
Activity