Skip to content

A platform for community discussion. Free, open, simple.

DEV: Raise on missing GHSA during release (#42102)

David Taylor2306592f8992
diff --git a/lib/tasks/release.rake b/lib/tasks/release.rake
index 5388f94d8b4..636885a12f4 100644
--- a/lib/tasks/release.rake
+++ b/lib/tasks/release.rake
@@ -227,7 +227,11 @@ namespace :release do
selected =
if (ghsa_ids = ENV["SECURITY_FIX_GHSA_IDS"])
requested = ghsa_ids.split(",").map(&:strip).map(&:downcase)
- choices.select { |pr| pr["ghsa_id"] && requested.include?(pr["ghsa_id"].downcase) }
+ matched =
+ choices.select { |pr| pr["ghsa_id"] && requested.include?(pr["ghsa_id"].downcase) }
+ missing = requested - matched.map { |pr| pr["ghsa_id"].downcase }
+ raise "No matching PR found for requested GHSA(s): #{missing.join(", ")}" if missing.any?
+ matched
else
prompt = TTY::Prompt.new
prompt_choices =