Skip to content

Commit 201441b

Browse files
committed
Only report to Slack actual things to fix
1 parent 4143861 commit 201441b

File tree

1 file changed

+14
-0
lines changed
  • src/strict_syntax_health

1 file changed

+14
-0
lines changed

src/strict_syntax_health/cli.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,6 +2088,20 @@ def send_slack_report(
20882088
)
20892089
total_warnings += r["warnings"]
20902090

2091+
# Check for version-topic issues in meta.yml
2092+
meta_has_issues = False
2093+
if module_meta_stats and module_meta_stats.get("total", 0) > 0:
2094+
if (
2095+
module_meta_stats.get("without_topic_versions", 0) > 0
2096+
or module_meta_stats.get("subworkflow_with_versions", 0) > 0
2097+
):
2098+
meta_has_issues = True
2099+
2100+
# Skip notification entirely when there is nothing to report
2101+
if total_errors == 0 and total_warnings == 0 and not meta_has_issues:
2102+
console.print("[dim]Slack report skipped: no errors, warnings, or version-topic issues found.[/dim]")
2103+
return
2104+
20912105
# Build summary text
20922106
if total_errors == 0 and total_warnings == 0:
20932107
summary = ":white_check_mark: No syntax errors or warnings in modules/subworkflows."

0 commit comments

Comments
 (0)