t-bug-catcher 0.2.4__tar.gz → 0.2.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/PKG-INFO +1 -1
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/setup.cfg +1 -1
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/setup.py +1 -1
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher/__init__.py +1 -1
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher/jira.py +24 -14
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher.egg-info/PKG-INFO +1 -1
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/MANIFEST.in +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/README.rst +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/pyproject.toml +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/requirements.txt +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher/bug_catcher.py +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher/bug_snag.py +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher/config.py +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher/exceptions.py +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher/utils/__init__.py +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher/utils/common.py +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher/utils/logger.py +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher/workitems.py +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher.egg-info/SOURCES.txt +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher.egg-info/dependency_links.txt +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher.egg-info/not-zip-safe +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher.egg-info/requires.txt +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/t_bug_catcher.egg-info/top_level.txt +0 -0
- {t_bug_catcher-0.2.4 → t_bug_catcher-0.2.6}/tests/test_t_bug_catcher.py +0 -0
|
@@ -216,18 +216,18 @@ class Jira:
|
|
|
216
216
|
Returns:
|
|
217
217
|
The JSON payload for creating a new issue.
|
|
218
218
|
"""
|
|
219
|
-
|
|
220
|
-
{
|
|
221
|
-
"
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
)
|
|
219
|
+
fields = {
|
|
220
|
+
"fields": {
|
|
221
|
+
"assignee": {"id": assignee if assignee else "-1"},
|
|
222
|
+
"description": description,
|
|
223
|
+
"issuetype": {"id": issue_type},
|
|
224
|
+
"project": {"key": self._project_key},
|
|
225
|
+
"summary": summary,
|
|
226
|
+
},
|
|
227
|
+
}
|
|
228
|
+
if labels:
|
|
229
|
+
fields["fields"]["labels"] = labels
|
|
230
|
+
payload = json.dumps(fields)
|
|
231
231
|
return payload
|
|
232
232
|
|
|
233
233
|
def move_ticket_to_board(self, ticket_id: str) -> None:
|
|
@@ -853,12 +853,22 @@ class Jira:
|
|
|
853
853
|
)
|
|
854
854
|
response = self.post_ticket(issue=issue)
|
|
855
855
|
|
|
856
|
+
if response.json().get("errors", {}).get("labels"):
|
|
857
|
+
issue = self.__generate_issue_body(
|
|
858
|
+
summary=summary[:255].split("\n")[0],
|
|
859
|
+
description=description,
|
|
860
|
+
assignee=assignee_id,
|
|
861
|
+
issue_type=issue_type,
|
|
862
|
+
)
|
|
863
|
+
response = self.post_ticket(issue=issue)
|
|
864
|
+
|
|
856
865
|
if response.status_code != 201:
|
|
857
866
|
logger.warning(
|
|
858
867
|
f"Failed to create Jira issue. Status code: {response.status_code}"
|
|
859
868
|
f" Error messages: {', '.join(response.json()['errorMessages'])}"
|
|
860
869
|
f" Errors: {response.json()['errors']}"
|
|
861
870
|
)
|
|
871
|
+
|
|
862
872
|
return response
|
|
863
873
|
|
|
864
874
|
ticket = response.json()
|
|
@@ -1003,7 +1013,7 @@ class Jira:
|
|
|
1003
1013
|
summary=summary,
|
|
1004
1014
|
description=description,
|
|
1005
1015
|
assignee_id=assignee_id,
|
|
1006
|
-
labels=["fatal_error"],
|
|
1016
|
+
labels=["bug_catcher", "fatal_error"],
|
|
1007
1017
|
)
|
|
1008
1018
|
return response
|
|
1009
1019
|
except Exception as ex:
|
|
@@ -1121,7 +1131,7 @@ class Jira:
|
|
|
1121
1131
|
headers=self.__get_headers(),
|
|
1122
1132
|
auth=self._auth,
|
|
1123
1133
|
)
|
|
1124
|
-
|
|
1134
|
+
|
|
1125
1135
|
return response
|
|
1126
1136
|
|
|
1127
1137
|
def filter_tickets(self, all_tickets: List, error_id: str) -> Optional[dict]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|