carson 2.20.0 → 2.22.0
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.
- checksums.yaml +4 -4
- data/MANUAL.md +1 -0
- data/RELEASE.md +14 -0
- data/VERSION +1 -1
- data/lib/carson/config.rb +1 -1
- data/lib/carson/runtime/audit.rb +6 -0
- data/lib/carson/runtime/review/sweep_support.rb +3 -0
- data/lib/carson/runtime/setup.rb +16 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 92af4bd3b6c18b621be3b43b6172fa4ec8ca0a67969be2a4bc1bdc86c9d047ef
|
|
4
|
+
data.tar.gz: a1a03fa58f49cbb72d25fd8c67c7fccb9904e79109aeaa71074929996b81bd5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5065b58d24c4a9326ea127bb764f521d6466108126e374a3662ae4feb86a2bfb41a5e70dd970338247d5f25f5765dd0958f329afdde41c73b0792faf08b5880e
|
|
7
|
+
data.tar.gz: c1d9619069ea00bb4d427897adfbe37374828153888ee5c3b279ea6af647ed12828d5109542a33bbdf77771efe651f9f1244d4c2cbcf56f11014ae259ae6df6b
|
data/MANUAL.md
CHANGED
|
@@ -345,6 +345,7 @@ Common environment overrides:
|
|
|
345
345
|
| `CARSON_REVIEW_DISPOSITION_PREFIX` | Required prefix for disposition comments. |
|
|
346
346
|
| `CARSON_REVIEW_SWEEP_WINDOW_DAYS` | Lookback window for review sweep. |
|
|
347
347
|
| `CARSON_REVIEW_SWEEP_STATES` | PR states to include in sweep. |
|
|
348
|
+
| `CARSON_REVIEW_BOT_USERNAMES` | Comma-separated bot usernames to ignore in review gate and sweep. |
|
|
348
349
|
| `CARSON_WORKFLOW_STYLE` | Workflow style override (`branch` or `trunk`). |
|
|
349
350
|
| `CARSON_RUBY_INDENTATION` | Ruby indentation policy (`tabs`, `spaces`, or `either`). |
|
|
350
351
|
|
data/RELEASE.md
CHANGED
|
@@ -5,6 +5,20 @@ Release-note scope rule:
|
|
|
5
5
|
- `RELEASE.md` records only version deltas, breaking changes, and migration actions.
|
|
6
6
|
- Operational usage guides live in `MANUAL.md` and `API.md`.
|
|
7
7
|
|
|
8
|
+
## 2.22.0 — Setup Prompts for Canonical Templates
|
|
9
|
+
|
|
10
|
+
### What changed
|
|
11
|
+
|
|
12
|
+
- **`carson setup` now prompts for canonical template directory.** The interactive setup flow includes a new prompt to configure `template.canonical`, the directory of `.github/` files synced across governed repos. Shows the current value when one is already set.
|
|
13
|
+
- **Audit hints when canonical templates are not configured.** `carson audit` now emits a hint when `template.canonical` is unset, guiding users to run `carson setup`.
|
|
14
|
+
|
|
15
|
+
## 2.21.0 — Review Sweep Skips Bot Authors
|
|
16
|
+
|
|
17
|
+
### What changed
|
|
18
|
+
|
|
19
|
+
- **Review sweep now skips bot-authored findings.** The sweep uses the same `bot_username?` guard as the review gate — comments, reviews, and review thread comments from configured bot usernames are excluded from sweep findings.
|
|
20
|
+
- **Default bot usernames populated.** `review.bot_usernames` now ships with `gemini-code-assist[bot]`, `github-actions[bot]`, and `dependabot[bot]`. Previously empty, requiring manual configuration. Override via `CARSON_REVIEW_BOT_USERNAMES` or `~/.carson/config.json`.
|
|
21
|
+
|
|
8
22
|
## 2.20.0 — Prune Orphan Branches
|
|
9
23
|
|
|
10
24
|
### What changed
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.22.0
|
data/lib/carson/config.rb
CHANGED
data/lib/carson/runtime/audit.rb
CHANGED
|
@@ -100,6 +100,12 @@ module Carson
|
|
|
100
100
|
else
|
|
101
101
|
audit_concise_problems << "Scope: unmatched paths — classify via scope.path_groups."
|
|
102
102
|
end
|
|
103
|
+
end
|
|
104
|
+
if config.template_canonical.nil? || config.template_canonical.to_s.empty?
|
|
105
|
+
puts_verbose ""
|
|
106
|
+
puts_verbose "[Canonical Templates]"
|
|
107
|
+
puts_verbose "HINT: canonical templates not configured — run carson setup to enable."
|
|
108
|
+
audit_concise_problems << "Hint: canonical templates not configured — run carson setup to enable."
|
|
103
109
|
end
|
|
104
110
|
write_and_print_pr_monitor_report(
|
|
105
111
|
report: monitor_report.merge(
|
|
@@ -27,6 +27,7 @@ module Carson
|
|
|
27
27
|
|
|
28
28
|
Array( details.fetch( :comments ) ).each do |comment|
|
|
29
29
|
next if comment.fetch( :author ) == pr_author
|
|
30
|
+
next if bot_username?( author: comment.fetch( :author ) )
|
|
30
31
|
hits = matched_risk_keywords( text: comment.fetch( :body ) )
|
|
31
32
|
next if hits.empty?
|
|
32
33
|
event_time = parse_time_or_nil( text: comment.fetch( :created_at ) )
|
|
@@ -43,6 +44,7 @@ module Carson
|
|
|
43
44
|
|
|
44
45
|
Array( details.fetch( :reviews ) ).each do |review|
|
|
45
46
|
next if review.fetch( :author ) == pr_author
|
|
47
|
+
next if bot_username?( author: review.fetch( :author ) )
|
|
46
48
|
hits = matched_risk_keywords( text: review.fetch( :body ) )
|
|
47
49
|
next if hits.empty?
|
|
48
50
|
event_time = parse_time_or_nil( text: review.fetch( :created_at ) )
|
|
@@ -59,6 +61,7 @@ module Carson
|
|
|
59
61
|
|
|
60
62
|
Array( details.fetch( :review_threads ) ).flat_map { |thread| thread.fetch( :comments ) }.each do |comment|
|
|
61
63
|
next if comment.fetch( :author ) == pr_author
|
|
64
|
+
next if bot_username?( author: comment.fetch( :author ) )
|
|
62
65
|
hits = matched_risk_keywords( text: comment.fetch( :body ) )
|
|
63
66
|
next if hits.empty?
|
|
64
67
|
event_time = parse_time_or_nil( text: comment.fetch( :created_at ) )
|
data/lib/carson/runtime/setup.rb
CHANGED
|
@@ -39,6 +39,8 @@ module Carson
|
|
|
39
39
|
merge_choice = prompt_merge_method
|
|
40
40
|
choices[ "govern.merge.method" ] = merge_choice unless merge_choice.nil?
|
|
41
41
|
|
|
42
|
+
canonical_choice = prompt_canonical_template
|
|
43
|
+
choices[ "template.canonical" ] = canonical_choice unless canonical_choice.nil?
|
|
42
44
|
|
|
43
45
|
write_setup_config( choices: choices )
|
|
44
46
|
end
|
|
@@ -143,6 +145,20 @@ module Carson
|
|
|
143
145
|
prompt_choice( options: options, default: 0 )
|
|
144
146
|
end
|
|
145
147
|
|
|
148
|
+
def prompt_canonical_template
|
|
149
|
+
puts_line ""
|
|
150
|
+
puts_line "Canonical template directory"
|
|
151
|
+
current = config.template_canonical
|
|
152
|
+
if current && !current.empty?
|
|
153
|
+
puts_line " Currently set to: #{current}"
|
|
154
|
+
puts_line " Leave blank to keep current value."
|
|
155
|
+
else
|
|
156
|
+
puts_line " A directory of .github/ files to sync across governed repos."
|
|
157
|
+
puts_line " Leave blank to skip for now."
|
|
158
|
+
end
|
|
159
|
+
prompt_custom_value( label: "Path" )
|
|
160
|
+
end
|
|
161
|
+
|
|
146
162
|
def prompt_choice( options:, default: )
|
|
147
163
|
options.each_with_index do |option, index|
|
|
148
164
|
puts_line " #{index + 1}) #{option.fetch( :label )}"
|