File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1212from jbi .models import (
1313 ActionContext ,
1414 Actions ,
15+ BugzillaWebhookComment ,
1516 BugzillaWebhookRequest ,
1617 JiraContext ,
1718 RunnerContext ,
@@ -35,6 +36,7 @@ def execute_action(
3536 The value returned by the action call is returned.
3637 """
3738 bug , event = request .bug , request .event
39+ webhook_comment : Optional [BugzillaWebhookComment ] = bug .comment
3840 runner_context = RunnerContext (
3941 bug = bug ,
4042 event = event ,
@@ -46,7 +48,10 @@ def execute_action(
4648 extra = runner_context .dict (),
4749 )
4850 try :
49- bug = bugzilla .get_client ().get_bug (bug .id )
51+ bug = bugzilla .get_client ().get_bug (
52+ bug .id
53+ ) # refresh bug data; this removes webhook specific info--but avoids duplications
54+ bug .comment = webhook_comment # inject webhook data back into bug
5055 except Exception as err :
5156 logger .exception ("Failed to get bug: %s" , err , extra = runner_context .dict ())
5257 raise IgnoreInvalidRequestError (
You can’t perform that action at this time.
0 commit comments