@@ -146,6 +146,19 @@ def status(self) -> str:
146146 return "skip"
147147 return "pass"
148148
149+ @property
150+ def skip_reason (self ) -> str :
151+ """Why a skipped scope did not run, or ``""`` when nobody said.
152+
153+ Newer commit-check releases name the reason on each skipped check (e.g.
154+ "author dependabot[bot] is in [commit].ignore_authors"). A bare
155+ "skipped" left the reader unable to tell a deliberate bypass from a
156+ broken setup.
157+ """
158+ if self .status != "skip" :
159+ return ""
160+ return next ((c ["reason" ] for c in self .checks if c .get ("reason" )), "" )
161+
149162 @property
150163 def failures (self ) -> list [dict [str , str ]]:
151164 """The checks that failed in this scope."""
@@ -362,6 +375,7 @@ def skipped_author_scope(flag: str) -> ScopeResult:
362375 "error" : "" ,
363376 "suggest" : "" ,
364377 "docs_url" : "" ,
378+ "reason" : "the pull request's head commit could not be resolved" ,
365379 }
366380 ],
367381 )
@@ -843,7 +857,8 @@ def _render_scopes(scopes: list[ScopeResult], include_docs: bool) -> list[str]:
843857 if scope .status == "skip" :
844858 # Deliberately not a ✔. Nothing was validated here, and a tick
845859 # claiming otherwise is what made a bypassed policy look enforced.
846- lines .append (f" ⊘ { label } (skipped)" )
860+ reason = scope .skip_reason
861+ lines .append (f" ⊘ { label } (skipped{ f': { reason } ' if reason else '' } )" )
847862 continue
848863 if scope .status == "pass" :
849864 value = _scope_value (scope )
@@ -988,6 +1003,8 @@ def render_step_log(results: list[ScopeResult]) -> None:
9881003 )
9891004 if total and skipped == total :
9901005 print ("\u2298 commit-check: all checks skipped, nothing was validated" )
1006+ if _skip_reasons (results ):
1007+ print (_skip_reasons (results ))
9911008 elif warned or skipped :
9921009 passed = total - skipped - warned
9931010 tail = []
@@ -998,6 +1015,8 @@ def render_step_log(results: list[ScopeResult]) -> None:
9981015 print (
9991016 f"\u2714 commit-check: { passed } of { total } checks passed, { ', ' .join (tail )} "
10001017 )
1018+ if _skip_reasons (results ):
1019+ print (_skip_reasons (results ))
10011020 else :
10021021 print ("\u2714 commit-check: all checks passed" )
10031022
@@ -1031,6 +1050,22 @@ def _skip_count(results: list[ScopeResult]) -> int:
10311050 return sum (1 for scope in results if scope .status == "skip" )
10321051
10331052
1053+ def _skip_reasons (results : list [ScopeResult ]) -> str :
1054+ """One sentence naming why checks were skipped, or ``""`` if unknown.
1055+
1056+ The verdict line is all most readers see, so it stays short: the config
1057+ section is dropped ("[commit].ignore_authors" and "[branch].ignore_authors"
1058+ both read "ignore_authors"), which folds the usual bot case into one
1059+ reason. The per-scope lines in the collapsed block keep the section.
1060+ """
1061+ reasons = list (
1062+ dict .fromkeys (
1063+ re .sub (r"\[\w+\]\." , "" , s .skip_reason ) for s in results if s .skip_reason
1064+ )
1065+ )
1066+ return f"Skipped because { '; ' .join (reasons )} ." if reasons else ""
1067+
1068+
10341069def _warn_count (results : list [ScopeResult ]) -> int :
10351070 """Number of scopes that carry at least one warning.
10361071
@@ -1211,17 +1246,22 @@ def _scope_value(scope: ScopeResult, max_len: int = 60) -> str:
12111246#
12121247# ⊘ **All 5 checks skipped** — nothing was validated
12131248#
1249+ # Skipped because author dependabot[bot] is in ignore_authors.
1250+ #
12141251# ```text
12151252# Commit message
1216- # ⊘ PR title (skipped)
1217- # ⊘ Commit 1/1 (skipped)
1253+ # ⊘ PR title (skipped: author dependabot[bot] is in [commit].ignore_authors )
1254+ # ⊘ Commit 1/1 (skipped: author dependabot[bot] is in [commit].ignore_authors )
12181255# Branch
1219- # ⊘ Branch (skipped)
1256+ # ⊘ Branch (skipped: author dependabot[bot] is in [branch].ignore_authors )
12201257# Author
1221- # ⊘ Author name (skipped)
1222- # ⊘ Author email (skipped)
1258+ # ⊘ Author name (skipped: author dependabot[bot] is in [commit].ignore_authors )
1259+ # ⊘ Author email (skipped: author dependabot[bot] is in [commit].ignore_authors )
12231260# ```
12241261#
1262+ # The reason comes from commit-check; an older CLI sends none, and the line
1263+ # reads "(skipped)" with no "Skipped because" sentence.
1264+ #
12251265# A skipped scope deliberately carries no ✔ and no checked value: nothing was
12261266# examined, so there is no value to report and no pass to claim. When only some
12271267# scopes skip, the verdict reads "✅ **3 of 5 checks passed**, 2 skipped".
@@ -1387,6 +1427,8 @@ def render_report(results: list[ScopeResult]) -> str:
13871427 # checks passed" here is the defect this branch exists to prevent.
13881428 lines .append (f"⊘ **All { total } { unit } skipped** — nothing was validated" )
13891429 lines .append ("" )
1430+ if _skip_reasons (results ):
1431+ lines .extend ([_skip_reasons (results ), "" ])
13901432 elif warned or skipped :
13911433 passed = total - skipped - warned
13921434 tail = []
@@ -1396,6 +1438,8 @@ def render_report(results: list[ScopeResult]) -> str:
13961438 tail .append (f"{ skipped } skipped" )
13971439 lines .append (f"✅ **{ passed } of { total } { unit } passed**, { ', ' .join (tail )} " )
13981440 lines .append ("" )
1441+ if _skip_reasons (results ):
1442+ lines .extend ([_skip_reasons (results ), "" ])
13991443 if warned :
14001444 lines .extend ([_markdown_table (results , "warn" , "Warnings" ), "" ])
14011445 else :
0 commit comments