github-security-report 0.24.0__tar.gz → 0.25.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. {github_security_report-0.24.0 → github_security_report-0.25.0}/PKG-INFO +8 -5
  2. {github_security_report-0.24.0 → github_security_report-0.25.0}/README.md +4 -1
  3. {github_security_report-0.24.0 → github_security_report-0.25.0}/pyproject.toml +6 -6
  4. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/_version.py +2 -2
  5. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/categories/tables.py +4 -3
  6. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/config/models.py +2 -1
  7. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/render/slack.py +23 -19
  8. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/report/tables.py +5 -5
  9. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/workflow_runs/aggregate.py +4 -3
  10. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/workflow_runs/tables.py +4 -14
  11. {github_security_report-0.24.0 → github_security_report-0.25.0}/.gitignore +0 -0
  12. {github_security_report-0.24.0 → github_security_report-0.25.0}/LICENSE +0 -0
  13. {github_security_report-0.24.0 → github_security_report-0.25.0}/LICENSES/Apache-2.0.txt +0 -0
  14. {github_security_report-0.24.0 → github_security_report-0.25.0}/scripts/README.md +0 -0
  15. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/__init__.py +0 -0
  16. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/authors.py +0 -0
  17. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/categories/__init__.py +0 -0
  18. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/categories/keys.py +0 -0
  19. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/categories/signals.py +0 -0
  20. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/classify.py +0 -0
  21. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/__init__.py +0 -0
  22. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/__main__.py +0 -0
  23. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/app.py +0 -0
  24. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/boundary.py +0 -0
  25. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/config_cmd.py +0 -0
  26. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/config_source.py +0 -0
  27. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/modes.py +0 -0
  28. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/options.py +0 -0
  29. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/outputs.py +0 -0
  30. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/progress.py +0 -0
  31. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/publish.py +0 -0
  32. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/remediation.py +0 -0
  33. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/serialise.py +0 -0
  34. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/cli/summary.py +0 -0
  35. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/__init__.py +0 -0
  36. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/accounting.py +0 -0
  37. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/alerts.py +0 -0
  38. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/analyses.py +0 -0
  39. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/batch_errors.py +0 -0
  40. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/codeql_parsers.py +0 -0
  41. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/copilot.py +0 -0
  42. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/endpoints.py +0 -0
  43. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/errors.py +0 -0
  44. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/events.py +0 -0
  45. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/failures.py +0 -0
  46. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/org_reads.py +0 -0
  47. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/paging.py +0 -0
  48. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/parsers.py +0 -0
  49. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/queries.py +0 -0
  50. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/reads.py +0 -0
  51. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/repo_parser.py +0 -0
  52. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/reviews.py +0 -0
  53. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/transport.py +0 -0
  54. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/workflow_runs.py +0 -0
  55. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/client/writes.py +0 -0
  56. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/code_quality.py +0 -0
  57. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/codeql/__init__.py +0 -0
  58. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/codeql/cleanup.py +0 -0
  59. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/codeql/facts.py +0 -0
  60. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/codeql/tables.py +0 -0
  61. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/collect/__init__.py +0 -0
  62. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/collect/codeql.py +0 -0
  63. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/collect/context.py +0 -0
  64. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/collect/exclusions.py +0 -0
  65. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/collect/extras.py +0 -0
  66. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/collect/graph.py +0 -0
  67. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/collect/org.py +0 -0
  68. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/collect/protocols.py +0 -0
  69. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/collect/repo.py +0 -0
  70. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/collect/run_sync.py +0 -0
  71. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/collect/scoping.py +0 -0
  72. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/collect/workflow_runs.py +0 -0
  73. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/config/__init__.py +0 -0
  74. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/config/blocks.py +0 -0
  75. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/config/dictionary.py +0 -0
  76. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/config/errors.py +0 -0
  77. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/config/key_notes.py +0 -0
  78. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/config/loader.py +0 -0
  79. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/config/order.py +0 -0
  80. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/config/schema.py +0 -0
  81. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/config/workflow_runs.py +0 -0
  82. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/gating.py +0 -0
  83. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/gitctx.py +0 -0
  84. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/issue_presentation.py +0 -0
  85. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/issues.py +0 -0
  86. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/layout.py +0 -0
  87. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/malware.py +0 -0
  88. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/matching.py +0 -0
  89. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/models.py +0 -0
  90. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/ordering.py +0 -0
  91. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/posture/__init__.py +0 -0
  92. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/posture/enablement.py +0 -0
  93. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/posture/facts.py +0 -0
  94. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/posture/quality.py +0 -0
  95. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/posture/releases.py +0 -0
  96. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/pulls/__init__.py +0 -0
  97. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/pulls/columns.py +0 -0
  98. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/pulls/counting.py +0 -0
  99. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/pulls/presentation.py +0 -0
  100. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/pulls/table.py +0 -0
  101. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/py.typed +0 -0
  102. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/ranking.py +0 -0
  103. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/remediate/__init__.py +0 -0
  104. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/remediate/codeql.py +0 -0
  105. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/remediate/model.py +0 -0
  106. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/render/__init__.py +0 -0
  107. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/render/html.py +0 -0
  108. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/render/markdown.py +0 -0
  109. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/render/slack_limits.py +0 -0
  110. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/render/slack_text.py +0 -0
  111. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/render/terminal.py +0 -0
  112. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/render/terminal_notices.py +0 -0
  113. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/report/__init__.py +0 -0
  114. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/report/aggregate.py +0 -0
  115. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/report/display.py +0 -0
  116. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/report/exclusions.py +0 -0
  117. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/report/signals.py +0 -0
  118. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/rulesets.py +0 -0
  119. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/runner.py +0 -0
  120. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/scope.py +0 -0
  121. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/secret_patterns.py +0 -0
  122. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/severity.py +0 -0
  123. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/summary.py +0 -0
  124. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/templates/index.html.j2 +0 -0
  125. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/templates/report.html.j2 +0 -0
  126. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/workflow_runs/__init__.py +0 -0
  127. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/workflow_runs/models.py +0 -0
  128. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/workflow_runs/store.py +0 -0
  129. {github_security_report-0.24.0 → github_security_report-0.25.0}/src/github_security_report/workflow_runs/store_codec.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: github-security-report
3
- Version: 0.24.0
3
+ Version: 0.25.0
4
4
  Summary: Security and quality reporting across GitHub organisations
5
5
  Project-URL: Homepage, https://github.com/lfreleng-actions/github-security-report-action
6
6
  Project-URL: Repository, https://github.com/lfreleng-actions/github-security-report-action
@@ -31,10 +31,10 @@ Requires-Dist: pyyaml==6.0.3
31
31
  Requires-Dist: rich==15.0.0
32
32
  Requires-Dist: typer==0.27.3
33
33
  Provides-Extra: dev
34
- Requires-Dist: mypy==2.4.0; extra == 'dev'
35
- Requires-Dist: pytest-asyncio==1.4.1; extra == 'dev'
34
+ Requires-Dist: mypy==2.4.1; extra == 'dev'
35
+ Requires-Dist: pytest-asyncio==1.4.1.post1; extra == 'dev'
36
36
  Requires-Dist: pytest-cov==7.1.0; extra == 'dev'
37
- Requires-Dist: pytest==9.1.1; extra == 'dev'
37
+ Requires-Dist: pytest==9.2.0; extra == 'dev'
38
38
  Requires-Dist: respx==0.23.1; extra == 'dev'
39
39
  Requires-Dist: ruff==0.17.3; extra == 'dev'
40
40
  Requires-Dist: syrupy==6.1.1; extra == 'dev'
@@ -204,7 +204,7 @@ tables (org mode):
204
204
  `code_quality` render toggle, or leave test repositories out of it alone
205
205
  with its `exclude_tests` patterns (see [Per-category exclusions](#per-category-exclusions)).
206
206
  - **Workflow Failures** — repositories whose GitHub Actions workflows failed
207
- in the window, ranked by failed runs. The motivating case is the bulk
207
+ in the window, ranked by fail rate, then failed runs. The motivating case is the bulk
208
208
  Dependabot merge whose integration tests need credentials, so they run
209
209
  only once merged and never fail on the pull request; the table exists to
210
210
  show which workflows fail, how often, and (in the detail table) whether a
@@ -219,6 +219,9 @@ tables (org mode):
219
219
  ones), **Retried** (runs that passed on a later attempt, a direct sign of
220
220
  flakiness), **Workflows** (how many distinct workflows failed) and **Worst
221
221
  workflow** (the one with the most failures, linked to its run history).
222
+ Slack draws the same fixed-width table narrowed to **Repository**,
223
+ **Failed**, **Runs** and **Fail %**, with its totals row and footer; the
224
+ other columns stay on the terminal, GitHub Pages and `report.json`.
222
225
  GitHub-managed workflows with no file in the repository to fix (Dependabot
223
226
  updates, default-setup CodeQL, Copilot review) are left out unless
224
227
  `workflow_runs.include_dynamic` is set. There is one table per time
@@ -160,7 +160,7 @@ tables (org mode):
160
160
  `code_quality` render toggle, or leave test repositories out of it alone
161
161
  with its `exclude_tests` patterns (see [Per-category exclusions](#per-category-exclusions)).
162
162
  - **Workflow Failures** — repositories whose GitHub Actions workflows failed
163
- in the window, ranked by failed runs. The motivating case is the bulk
163
+ in the window, ranked by fail rate, then failed runs. The motivating case is the bulk
164
164
  Dependabot merge whose integration tests need credentials, so they run
165
165
  only once merged and never fail on the pull request; the table exists to
166
166
  show which workflows fail, how often, and (in the detail table) whether a
@@ -175,6 +175,9 @@ tables (org mode):
175
175
  ones), **Retried** (runs that passed on a later attempt, a direct sign of
176
176
  flakiness), **Workflows** (how many distinct workflows failed) and **Worst
177
177
  workflow** (the one with the most failures, linked to its run history).
178
+ Slack draws the same fixed-width table narrowed to **Repository**,
179
+ **Failed**, **Runs** and **Fail %**, with its totals row and footer; the
180
+ other columns stay on the terminal, GitHub Pages and `report.json`.
178
181
  GitHub-managed workflows with no file in the repository to fix (Dependabot
179
182
  updates, default-setup CodeQL, Copilot review) are left out unless
180
183
  `workflow_runs.include_dynamic` is set. There is one table per time
@@ -59,12 +59,12 @@ Issues = "https://github.com/lfreleng-actions/github-security-report-action/issu
59
59
 
60
60
  [project.optional-dependencies]
61
61
  dev = [
62
- "pytest==9.1.1",
63
- "pytest-asyncio==1.4.1",
62
+ "pytest==9.2.0",
63
+ "pytest-asyncio==1.4.1.post1",
64
64
  "pytest-cov==7.1.0",
65
65
  "respx==0.23.1",
66
66
  "syrupy==6.1.1",
67
- "mypy==2.4.0",
67
+ "mypy==2.4.1",
68
68
  "ruff==0.17.3",
69
69
  "types-jsonschema==4.26.0.20261006",
70
70
  "types-PyYAML==6.0.12.20250915",
@@ -91,12 +91,12 @@ include = ["src", "README.md", "LICENSE*", "pyproject.toml"]
91
91
 
92
92
  [dependency-groups]
93
93
  dev = [
94
- "pytest==9.1.1",
95
- "pytest-asyncio==1.4.1",
94
+ "pytest==9.2.0",
95
+ "pytest-asyncio==1.4.1.post1",
96
96
  "pytest-cov==7.1.0",
97
97
  "respx==0.23.1",
98
98
  "syrupy==6.1.1",
99
- "mypy==2.4.0",
99
+ "mypy==2.4.1",
100
100
  "ruff==0.17.3",
101
101
  "types-jsonschema==4.26.0.20261006",
102
102
  "types-PyYAML==6.0.12.20250915",
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.24.0'
22
- __version_tuple__ = version_tuple = (0, 24, 0)
21
+ __version__ = version = '0.25.0'
22
+ __version_tuple__ = version_tuple = (0, 25, 0)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -230,9 +230,10 @@ TABLE_CATEGORIES: dict[CategoryKey, CategoryMeta] = {
230
230
  ),
231
231
  description=(
232
232
  "Repositories whose GitHub Actions workflows failed in the window, "
233
- "ranked by failed runs. Runs counts the concluded runs of every "
234
- "workflow in the repository; Fail % is failed over failed plus "
235
- "passed, so skipped and cancelled runs (Skipped) never dilute it. "
233
+ "ranked by fail rate, then failed runs. Runs counts the concluded "
234
+ "runs of every workflow in the repository; Fail % is failed over "
235
+ "failed plus passed, so skipped and cancelled runs (Skipped) never "
236
+ "dilute it. "
236
237
  "Retried counts runs that passed on a later attempt, a direct sign "
237
238
  "of flakiness. Workflows is how many distinct workflows failed, and "
238
239
  "Worst workflow the one with the most failures. GitHub-managed "
@@ -127,7 +127,8 @@ _TERMINAL_ONLY = OutputToggles(cli=True, slack=False, markdown=False, html=False
127
127
  # Surfaces for a table too wide and too long for a chat digest: the per-workflow
128
128
  # detail of the Workflow Failures category runs to several rows per repository
129
129
  # and a dozen columns, so it stays off Slack even once enabled, while the
130
- # per-repository ranking carries the headline there.
130
+ # per-repository ranking carries the headline there, narrowed to its four
131
+ # headline columns (see ``TableSection.slack_columns``).
131
132
  _NO_SLACK = OutputToggles(cli=True, slack=False, markdown=True, html=True)
132
133
 
133
134
  # Categories whose default visibility is narrower than "every surface". Merged
@@ -16,7 +16,7 @@ limit is breached, so every block built here is sized by
16
16
 
17
17
  from __future__ import annotations
18
18
 
19
- from collections.abc import Callable
19
+ from collections.abc import Callable, Sequence
20
20
 
21
21
  from github_security_report import layout
22
22
  from github_security_report.categories import CategoryKey
@@ -33,7 +33,6 @@ from github_security_report.render.slack_limits import (
33
33
  from github_security_report.render.slack_text import (
34
34
  _fixed_table,
35
35
  _fixed_table_generic,
36
- _mrkdwn,
37
36
  _name_breaks,
38
37
  _name_cap,
39
38
  _summary_text,
@@ -75,37 +74,42 @@ def _table_block(
75
74
  (genuinely no data) is skipped, keeping the brevity-first digest tight. The
76
75
  explanatory description is omitted: Slack is a brevity-first surface. A
77
76
  boolean feature table draws no fixed-width table: its repositories are
78
- named in the footer, as on every other surface. A table whose rows carry
79
- a ``digest`` line is drawn as a bullet per row instead of a fixed-width
80
- table: it is too wide for a digest, and the line says what matters.
77
+ named in the footer, as on every other surface. A table declaring
78
+ ``slack_columns`` is drawn narrowed to them: the totals and footer rows are
79
+ computed at full width first and then projected with the header and rows.
81
80
  """
82
81
  lines = build_summary(section.summary_counts(exclusions, repo_list=repo_list))
83
82
  row_cap = 0 if section.lists_repos else len(truncate(section.rows, top_n)[0])
84
83
  name_cap = _name_cap(lines, top_n)
85
84
  if not row_cap and not _summary_text(lines, names=name_cap):
86
85
  return None
87
- digest = bool(section.rows) and all(row.digest for row in section.rows)
86
+ keep = section.slack_columns or tuple(range(len(section.columns)))
87
+
88
+ def project(cells: Sequence[str]) -> list[str]:
89
+ return [cells[i] for i in keep]
88
90
 
89
91
  def build(rows: int, names: int) -> str:
90
92
  text = f"*{section.title}*"
91
- if rows and digest:
92
- shown = section.rows[:rows]
93
- text += "".join(f"\n• {_mrkdwn(row.digest)}" for row in shown)
94
- hidden = len(section.rows) - len(shown)
95
- if hidden:
96
- text += f"\n… and {hidden} more"
97
- elif rows:
93
+ if rows:
98
94
  shown = section.rows[:rows]
99
- cells = [[row.repo.name, *row.cells] for row in shown]
95
+ cells = [project([row.repo.name, *row.cells]) for row in shown]
100
96
  totals = table_column_totals(section, shown)
101
97
  if totals is not None:
102
- cells.append(list(totals))
98
+ cells.append(project(totals))
103
99
  # Aggregate rows beneath the totals, already full width so the
104
- # fixed-width column alignment holds. Not a personal surface: a
105
- # channel digest is read by the whole team, not by the token owner.
100
+ # fixed-width column alignment holds. Their value belongs under the
101
+ # last column, so they are rebuilt at the projected width rather
102
+ # than projected: the value must land once, under the last drawn
103
+ # column, whichever columns the declaration keeps or reorders.
104
+ # Not a personal surface: a channel digest is read by the whole
105
+ # team, not by the token owner.
106
106
  for footer_row in table_footer_rows(section, shown):
107
- cells.append(list(footer_row))
108
- table = _fixed_table_generic(section.columns, cells)
107
+ if len(keep) > 1:
108
+ gap = [""] * (len(keep) - 2)
109
+ cells.append([footer_row[0], *gap, footer_row[-1]])
110
+ else:
111
+ cells.append([footer_row[0]])
112
+ table = _fixed_table_generic(tuple(project(section.columns)), cells)
109
113
  hidden = len(section.rows) - len(shown)
110
114
  if hidden:
111
115
  table += f"\n… and {hidden} more"
@@ -62,11 +62,6 @@ class TableRow:
62
62
  # surfaces; the terminal and Slack show the text alone. Empty means no
63
63
  # cell links anywhere. Column 0, the repository, links via ``repo``.
64
64
  cell_urls: tuple[str | None, ...] = ()
65
- # A one-line rendering of the row for the brevity-first surface (Slack),
66
- # where a table of this row's width would not fit a digest. Empty means
67
- # the row has none and Slack draws the table. Only the Workflow Failures
68
- # tables set it today.
69
- digest: str = ""
70
65
  # This row's contribution to each of its table's ``footer_labels``, in the
71
66
  # same order. Summed over the *displayed* rows at render time, exactly like
72
67
  # the column totals, so a truncated table's footer describes what is on
@@ -152,6 +147,11 @@ class TableSection:
152
147
  # table. Sibling windows of one category render beneath the first as
153
148
  # children, and each surface shows the windows it is configured for.
154
149
  window_days: int | None = None
150
+ # The column indices (into ``columns``) the brevity-first surface (Slack)
151
+ # draws, in order, starting with 0, the repository. Empty means every
152
+ # column. A table too wide for a chat message names its headline columns
153
+ # here; the other surfaces and ``report.json`` always carry all of them.
154
+ slack_columns: tuple[int, ...] = ()
155
155
 
156
156
  @property
157
157
  def title(self) -> str:
@@ -388,8 +388,9 @@ def repo_stats(
388
388
  """One entry per repository with a concluded run in the window.
389
389
 
390
390
  Repositories with no failures are included, so the caller decides whether
391
- a clean repository is worth a row. Sorted by failures descending, then
392
- fail rate descending, then repository.
391
+ a clean repository is worth a row. Sorted by fail rate descending, then
392
+ failures descending, then repository: how often a repository fails is the
393
+ actionable signal, while its raw failure count tracks how busy it is.
393
394
  """
394
395
  admitted = window_records(records, generated_at=generated_at, options=options)
395
396
  # The workflow list is already worst-first, so the first entry seen for a
@@ -401,5 +402,5 @@ def repo_stats(
401
402
  for record in sorted(admitted, key=_ORDER):
402
403
  groups[record.repo].append(record)
403
404
  out = [_repo(repo, runs, worst.get(repo)) for repo, runs in groups.items()]
404
- out.sort(key=lambda s: (-s.failed, -s.fail_rate, s.repo))
405
+ out.sort(key=lambda s: (-s.fail_rate, -s.failed, s.repo))
405
406
  return out
@@ -48,6 +48,9 @@ REPO_COLUMNS = (
48
48
  "Workflows",
49
49
  "Worst workflow",
50
50
  )
51
+ # The ranking's headline columns, which Slack draws in place of all eight:
52
+ # Repository, Failed, Runs and Fail %.
53
+ REPO_SLACK_COLUMNS = (0, 1, 2, 3)
51
54
  DETAIL_COLUMNS = (
52
55
  "Repository",
53
56
  "Workflow",
@@ -127,19 +130,6 @@ def _workflow_url(repo: Repo, path: str) -> str | None:
127
130
  return f"{repo.html_url}/actions/workflows/{name}"
128
131
 
129
132
 
130
- def _digest(repo: Repo, stats: RepoWindowStats) -> str:
131
- """One line for the brevity-first surface: the headline and the worst."""
132
- rate = _percent(stats.fail_rate)
133
- line = f"{repo.name} — {stats.failed}/{stats.runs} failed ({rate})"
134
- worst = stats.worst
135
- if worst is not None:
136
- line += (
137
- f" · worst: {worst.workflow_name} "
138
- f"({worst.failed}/{worst.runs}, {worst.pattern})"
139
- )
140
- return line
141
-
142
-
143
133
  def _repo_row(repo: Repo, stats: RepoWindowStats, threshold: float) -> TableRow:
144
134
  worst = stats.worst
145
135
  worst_text = (
@@ -176,7 +166,6 @@ def _repo_row(repo: Repo, stats: RepoWindowStats, threshold: float) -> TableRow:
176
166
  ),
177
167
  cell_urls=(None,) * 6
178
168
  + (_workflow_url(repo, worst.workflow_path) if worst else None,),
179
- digest=_digest(repo, stats),
180
169
  )
181
170
 
182
171
 
@@ -324,6 +313,7 @@ def build_workflow_failure_tables(
324
313
  unknown_count=unknown_count,
325
314
  notes=notes,
326
315
  window_days=days,
316
+ slack_columns=REPO_SLACK_COLUMNS,
327
317
  )
328
318
  )
329
319
  detail_tables.append(