brainiac-fizzy 0.0.34 → 0.0.35

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 521af9bdc041753be700051f9030e6423b50d9b3e30540ceedc04c6e3afd437f
4
- data.tar.gz: 2359e3b29fed26076532d20f490a171b71d3c2aedba48d5e58ed768906dc8e69
3
+ metadata.gz: f955d8bdd850598beb38a7779cee4018d05983e92fba4b331032915d4681716f
4
+ data.tar.gz: 7151d9a8f1b8ccdcfc2d1bb0d7a695ece787e279dbc88e7c567c7d8ea11cbe14
5
5
  SHA512:
6
- metadata.gz: f0ae809a2d5deb97132e2182dca55738ff5aabdcf112ecebc1a9ae5c80e8d0a9a99ac645fb80edbe180bd50693ee01e5f681ea3d12d541c8c1c042968b6d1a00
7
- data.tar.gz: 0a638ffec02cfefd787dc478c1c99456df2c8296f87f9a2002352c192b600286dffa0443306c06ac1701186eb97365c10a268a426cd260b6ad4ae0c186f9b986
6
+ metadata.gz: 8e9c9b4b9de9d348eda0279358b0353be2b40a281e59b33e2ba0b3d425113b69096e501dde2fa8b459b3bb5d4d7273ba05830189716740910ac0c25f1ffda1fe
7
+ data.tar.gz: 8ae711d9382289a266374f9a5291286c2710ec13e6f83cf601ffb81a907c2f41bfc3dc5330bb59ca7caf339a0e343bd5e9dac0e8f66af666b3d76655f3c0b6bd
@@ -58,12 +58,15 @@ def handle_card_assigned(payload, board_key: nil)
58
58
  parse_inline_tags(title.to_s)[:profile]
59
59
  end
60
60
 
61
- # Persist initial overrides from card tags to the work item
61
+ # Persist initial overrides from card tags to the work item (profile included, so
62
+ # later comments without a [p:X] keep using it).
63
+ profile_kwargs = work_item_overrides_support_profile? ? { inline_profile: initial_profile } : {}
62
64
  resolve_work_item_overrides(
63
65
  branch: branch,
64
66
  inline_cli_provider: initial_cli,
65
67
  inline_model: initial_model,
66
- inline_effort: initial_effort
68
+ inline_effort: initial_effort,
69
+ **profile_kwargs
67
70
  )
68
71
 
69
72
  maybe_create_ephemeral_belt_env(
@@ -112,24 +112,30 @@ def build_comment_context(eventable:, plain_text:, tags:, card_internal_id:, car
112
112
  inline_cli = detect_cli_provider(text: plain_text, tags: card_tags)
113
113
  inline_model, inline_model_explicit = detect_model_explicit(project_config, text: plain_text)
114
114
  inline_effort = detect_effort(project_config, tags: card_tags, text: plain_text)
115
+ inline_profile = detect_comment_profile(plain_text, card_tags, tags)
115
116
 
116
117
  # Resolve overrides against the work item — merges stored overrides with inline tags
117
- # and persists any new inline tags for future dispatches.
118
+ # and persists any new inline tags for future dispatches. The profile is sticky too:
119
+ # a [p:k+] comment keeps later untagged comments on k+ until a different [p:X].
118
120
  branch = card_info["branch"] if card_info.is_a?(Hash)
119
121
  if branch
122
+ profile_kwargs = work_item_overrides_support_profile? ? { inline_profile: inline_profile } : {}
120
123
  resolved = resolve_work_item_overrides(
121
124
  branch: branch,
122
125
  inline_cli_provider: inline_cli,
123
126
  inline_model: inline_model,
124
- inline_effort: inline_effort
127
+ inline_effort: inline_effort,
128
+ **profile_kwargs
125
129
  )
126
130
  effective_cli = resolved[:cli_provider]
127
131
  effective_model = resolved[:model]
128
132
  effective_effort = resolved[:effort]
133
+ effective_profile = resolved.fetch(:profile, inline_profile)
129
134
  else
130
135
  effective_cli = inline_cli
131
136
  effective_model = inline_model
132
137
  effective_effort = inline_effort
138
+ effective_profile = inline_profile
133
139
  end
134
140
 
135
141
  CommentContext.new(
@@ -147,7 +153,7 @@ def build_comment_context(eventable:, plain_text:, tags:, card_internal_id:, car
147
153
  card_tags: card_tags,
148
154
  worktree_override: resolve_worktree_override(tags, project_config),
149
155
  fresh: tags[:fresh],
150
- profile: detect_comment_profile(plain_text, card_tags, tags),
156
+ profile: effective_profile,
151
157
  comment_vars: {
152
158
  "COMMENT_CREATOR" => creator_name || "Unknown",
153
159
  "COMMENT_ID" => comment_id.to_s,
@@ -156,6 +162,11 @@ def build_comment_context(eventable:, plain_text:, tags:, card_internal_id:, car
156
162
  )
157
163
  end
158
164
 
165
+ # Older core builds' resolve_work_item_overrides has no inline_profile: keyword.
166
+ def work_item_overrides_support_profile?
167
+ method(:resolve_work_item_overrides).parameters.any? { |t, n| t == :key && n == :inline_profile }
168
+ end
169
+
159
170
  # Resolve the profile for a comment: prefer core's tag-aware detect_profile
160
171
  # (inline text + card tags), falling back to inline-only for older core.
161
172
  def detect_comment_profile(plain_text, card_tags, tags)
@@ -3,7 +3,7 @@
3
3
  module Brainiac
4
4
  module Plugins
5
5
  module Fizzy
6
- VERSION = "0.0.34"
6
+ VERSION = "0.0.35"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brainiac-fizzy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.34
4
+ version: 0.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Davis