python-jira-plus 1.0.11__tar.gz → 1.0.13__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.
- {python_jira_plus-1.0.11/python_jira_plus.egg-info → python_jira_plus-1.0.13}/PKG-INFO +1 -1
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/python_jira_plus/jira_plus.py +8 -2
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13/python_jira_plus.egg-info}/PKG-INFO +1 -1
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/setup.py +1 -1
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/LICENSE +0 -0
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/MANIFEST.in +0 -0
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/README.md +0 -0
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/pyproject.toml +0 -0
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/python_jira_plus/__init__.py +0 -0
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/python_jira_plus/describe_allowed_value.py +0 -0
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/python_jira_plus.egg-info/SOURCES.txt +0 -0
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/python_jira_plus.egg-info/dependency_links.txt +0 -0
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/python_jira_plus.egg-info/requires.txt +0 -0
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/python_jira_plus.egg-info/top_level.txt +0 -0
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/requirements.txt +0 -0
- {python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/setup.cfg +0 -0
|
@@ -51,8 +51,7 @@ class JiraPlus:
|
|
|
51
51
|
self.jira_client = self.create_connection()
|
|
52
52
|
self.check_client_connection()
|
|
53
53
|
|
|
54
|
-
@retry(stop_max_attempt_number=3,
|
|
55
|
-
wait_fixed=180000) # Retry 3 times with a 3-min (180000) delay between each attempt
|
|
54
|
+
@retry(stop_max_attempt_number=3, wait_fixed=180000)
|
|
56
55
|
def create_connection(self, timeout=580) -> Optional[JIRA]:
|
|
57
56
|
if self.server_type == ServerType.ON_PREMISE and not self.sso:
|
|
58
57
|
jira_client = JIRA(
|
|
@@ -162,6 +161,9 @@ class JiraPlus:
|
|
|
162
161
|
break
|
|
163
162
|
retries = 0 # reset on success
|
|
164
163
|
except JIRAError as err:
|
|
164
|
+
if err.status_code == 400:
|
|
165
|
+
self.logger.error(f"Bad Request: {err.text}")
|
|
166
|
+
raise JIRAError(f"Bad Request: {err.text}")
|
|
165
167
|
retries += 1
|
|
166
168
|
self.logger.warning(f"Retry {retries}/{jira_err_limit} after JIRAError: {err}")
|
|
167
169
|
if retries >= jira_err_limit:
|
|
@@ -353,6 +355,10 @@ class JiraPlus:
|
|
|
353
355
|
self.logger.exception(f"Unexpected error: {err}")
|
|
354
356
|
return False
|
|
355
357
|
|
|
358
|
+
def add_comment(self, issue: str, comment: str) -> None:
|
|
359
|
+
self.jira_client.add_comment(issue=issue, body=comment)
|
|
360
|
+
self.logger.debug(f"Comment added to issue {issue} successfully.")
|
|
361
|
+
|
|
356
362
|
def _get_available_link_types(self) -> set[str]:
|
|
357
363
|
try:
|
|
358
364
|
return {link_type.name for link_type in self.jira_client.issue_link_types()}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/python_jira_plus/describe_allowed_value.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_jira_plus-1.0.11 → python_jira_plus-1.0.13}/python_jira_plus.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|