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 12
12
from jbi .models import (
13
13
ActionContext ,
14
14
Actions ,
15
+ BugzillaWebhookComment ,
15
16
BugzillaWebhookRequest ,
16
17
JiraContext ,
17
18
RunnerContext ,
@@ -35,6 +36,7 @@ def execute_action(
35
36
The value returned by the action call is returned.
36
37
"""
37
38
bug , event = request .bug , request .event
39
+ webhook_comment : Optional [BugzillaWebhookComment ] = bug .comment
38
40
runner_context = RunnerContext (
39
41
bug = bug ,
40
42
event = event ,
@@ -46,7 +48,10 @@ def execute_action(
46
48
extra = runner_context .dict (),
47
49
)
48
50
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
50
55
except Exception as err :
51
56
logger .exception ("Failed to get bug: %s" , err , extra = runner_context .dict ())
52
57
raise IgnoreInvalidRequestError (
You can’t perform that action at this time.
0 commit comments