-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The current bug model has a comment
and an attachment
field.
jira-bugzilla-integration/jbi/bugzilla/models.py
Lines 126 to 127 in 3f8bf31
comment: Optional[WebhookComment] = None | |
attachment: Optional[WebhookAttachment] = None |
Because that is what the Webhook payload sends us when target == 'comment'
or target == 'attachment'
.
Example with this event:
event: {
"target": "attachment",
"changes": null,
"time": "datetime.datetime(2025, 10, 16, 11, 52, 57, tzinfo=TzInfo(0))",
"user": {
"login": "[email protected]",
"real_name": "Mathieu Leplatre [:leplatrem]",
"id": 526079
},
"routing_key": "attachment.create",
"action": "create"
},
bug: {
"priority": "",
"resolution": "",
"type": "enhancement",
"keywords": [],
"is_private": false,
"creator": "[email protected]",
"assigned_to": "[email protected]",
"see_also": [
"https://mozilla-hub.atlassian.net/browse/RMST-161"
],
"whiteboard": "[remote-settings]",
"comment": null,
"groups": null,
"status": "NEW",
"id": 1984079,
"cf_fx_points": "",
"attachment": {
"content_type": "text/x-phabricator-request",
"flags": [],
"is_private": false,
"is_obsolete": false,
"description": "Bug 1984079 - Iterate through list of signatures r?say-yawn",
"file_name": "phabricator-D268863-url.txt",
"id": 9520447,
"is_patch": false,
"creation_time": "datetime.datetime(2025, 10, 16, 11, 52, 57, tzinfo=TzInfo(0))"
},
"summary": "Add support for multiple signatures in the collection metadata",
"product": "Firefox",
"severity": "--",
"component": "Remote Settings Client",
"flags": []
}
But conceptually, a bug has several attachments and comments.
We should probably split that model and introduce a WebhookRequestBug
model that differs from just Bug
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request