From 66055161fba70df2a79429a40978a589e94c7ac6 Mon Sep 17 00:00:00 2001 From: sterni Date: Thu, 3 Feb 2022 14:50:13 +0100 Subject: feat(tools/rust-crates-advisory): omit GHFM checklist in buildkite Buildkite doesn't understand GitHub Flavored Markdown and having a read only checklist in there is probably not much use. Change-Id: I41538487087e8c817b1a5e653f077bb0fbe6eb47 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5201 Reviewed-by: sterni Reviewed-by: tazjin Autosubmit: sterni Tested-by: BuildkiteCI --- tools/rust-crates-advisory/default.nix | 3 +++ tools/rust-crates-advisory/format-audit-result.jq | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/rust-crates-advisory/default.nix b/tools/rust-crates-advisory/default.nix index ac19017362..8382ec2543 100644 --- a/tools/rust-crates-advisory/default.nix +++ b/tools/rust-crates-advisory/default.nix @@ -175,6 +175,9 @@ let "--arg" "maintainers" "" + "--argjson" + "checklist" + "false" "-f" ./format-audit-result.jq ] diff --git a/tools/rust-crates-advisory/format-audit-result.jq b/tools/rust-crates-advisory/format-audit-result.jq index 6f230df3f9..7c9e3cbac7 100644 --- a/tools/rust-crates-advisory/format-audit-result.jq +++ b/tools/rust-crates-advisory/format-audit-result.jq @@ -9,6 +9,8 @@ # for the current lock file. # - attr: An attribute name (or otherwise unique identifier) to associate the # report for the current lock file with. +# - checklist: If true, the markdown report will use GHFM checklists for the +# report, allowing to tick of attributes as taken care of. # Link to human-readable advisory info for a given vulnerability def link: @@ -62,7 +64,7 @@ def format_vulnerability: if .vulnerabilities.found | not then "" else - ([ "- [ ] " + ([ "-", if $checklist then " [ ] " else " " end , "`", $attr, "`: " , (.vulnerabilities.count | tostring) , " vulnerabilities in Cargo.lock" -- cgit 1.4.1