Skip to content

Commit 47f636e

Browse files
committed
manual changes
1 parent a46322b commit 47f636e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/groundlight/experimental_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ def make_webhook_action(
188188
payload_template=payload_template,
189189
)
190190

191-
def make_payload_template(self, template: str) -> PayloadTemplate:
191+
def make_payload_template(self, template: str, headers: Optional[Dict[str, str]] = None) -> PayloadTemplate:
192192
"""
193193
Creates a PayloadTemplate object for use in creating alerts
194194
"""
195-
return PayloadTemplate(template=template)
195+
return PayloadTemplate(template=template, headers=headers)
196196

197197
def create_alert( # pylint: disable=too-many-locals, too-many-arguments # noqa: PLR0913
198198
self,
@@ -282,7 +282,7 @@ def create_alert( # pylint: disable=too-many-locals, too-many-arguments # noqa
282282
url=str(webhook_action.url),
283283
include_image=webhook_action.include_image,
284284
payload_template=(
285-
PayloadTemplateRequest(template=webhook_action.payload_template.template)
285+
PayloadTemplateRequest(template=webhook_action.payload_template.template, headers=webhook_action.payload_template.headers)
286286
if webhook_action.payload_template
287287
else None
288288
),

0 commit comments

Comments
 (0)