From c0fa8624cfb877255d1fd36e94ad57399aa6d4bb Mon Sep 17 00:00:00 2001 From: Jeff Saxe Date: Thu, 21 Oct 2021 12:21:07 -0400 Subject: [PATCH] Use actual re.sub() regex-replace rather than str.replace(), since we want to eliminate all varieties of whitespace from the Labels sent to Jira. --- Jira/scripts/actionExecutor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jira/scripts/actionExecutor.py b/Jira/scripts/actionExecutor.py index 0f67dfe..d773130 100644 --- a/Jira/scripts/actionExecutor.py +++ b/Jira/scripts/actionExecutor.py @@ -2,6 +2,7 @@ import json import logging import sys +import re import requests from requests.auth import HTTPBasicAuth @@ -122,7 +123,7 @@ def main(): }, "summary": queue_message.get("summary"), "description": queue_message.get("description"), - "labels": [toLabel.replace("\\s", "")] + "labels": [ re.sub('\s','',toLabel) ] } } elif mapped_action == "resolveIssue":