diff --git a/.github/ISSUE_TEMPLATE/scheduled-maintenance.md b/.github/ISSUE_TEMPLATE/scheduled-maintenance.md index 3fba39844..c74ced540 100644 --- a/.github/ISSUE_TEMPLATE/scheduled-maintenance.md +++ b/.github/ISSUE_TEMPLATE/scheduled-maintenance.md @@ -7,17 +7,18 @@ assignees: "" --- > **Required:** Replace both 2000 timestamps with the approved UTC start/end. -> List only genuinely affected slugs after `expectedDown` or -> `expectedDegraded`; leave the value empty when that impact is not expected. +> Add `expectedDown` or `expectedDegraded` inside the metadata comment only +> when that impact is expected. Never leave either key with an empty value; +> the pinned monitor cannot parse an empty `key:` line. Valid component slugs: `website`, `api`, `scan-gateway`. +Optional metadata examples: `expectedDown: api` and +`expectedDegraded: website, scan-gateway`. ## Summary diff --git a/scripts/validate.rb b/scripts/validate.rb index 87a4d2d17..f7532f62d 100755 --- a/scripts/validate.rb +++ b/scripts/validate.rb @@ -165,8 +165,14 @@ def check(condition, message) "first maintenance comment needs a safe start placeholder") check(first_metadata.include?("end: 2000-01-01T00:30:00Z"), "first maintenance comment needs a safe end placeholder") -check(first_metadata.include?("expectedDown:") && first_metadata.include?("expectedDegraded:"), - "first maintenance comment needs optional impact metadata") +blank_impact_metadata = first_metadata.lines.any? do |line| + line.match?(/^\s*expected(?:Down|Degraded):\s*$/) +end +check(!blank_impact_metadata, + "maintenance metadata must not contain blank expectedDown/expectedDegraded values") +check(issue_template.include?("expectedDown: api") && + issue_template.include?("expectedDegraded: website, scan-gateway"), + "maintenance template needs safe optional impact examples") if ERRORS.empty? puts "Status configuration validation passed (#{sites.length} components, full-SHA workflows)."