Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rdjson_formatter/rdjson_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

# Create message with fix guidance
patched = advisory['recommendation'] || 'No fix available'
message = "Title: #{title}\nSolution: #{patched}"
message = "[#{severity}] #{title}\nSolution: #{patched}"

# Find package line in yarn.lock
# yarn.lock has package entries like: "package-name@^1.0.0:"
Expand Down
2 changes: 1 addition & 1 deletion script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fi

export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"

echo '::group:: Running yarn audit with reviewdog 🐶 ...'
echo "::group:: Running yarn audit with reviewdog 🐶 (fail on ${INPUT_FAIL_LEVEL}) ..."

# shellcheck disable=SC2086
yarn audit --json \
Expand Down
4 changes: 2 additions & 2 deletions test/rdjson_formatter/testdata/result.ok
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"severity": "ERROR",
"diagnostics": [
{
"message": "Title: Prototype Pollution in minimist\nSolution: Upgrade to version 0.2.1 or later",
"message": "[moderate] Prototype Pollution in minimist\nSolution: Upgrade to version 0.2.1 or later",
"location": {
"path": "yarn.lock",
"range": {
Expand All @@ -23,7 +23,7 @@
}
},
{
"message": "Title: Prototype Pollution in minimist\nSolution: Upgrade to version 0.2.4 or later",
"message": "[critical] Prototype Pollution in minimist\nSolution: Upgrade to version 0.2.4 or later",
"location": {
"path": "yarn.lock",
"range": {
Expand Down