Added Jira connectivity testing. Added alert management in AdminForm
This commit is contained in:
@@ -39,6 +39,18 @@ class Jira:
|
||||
self.api_token = api_token
|
||||
self.auth = HTTPBasicAuth(self.user_name, self.api_token)
|
||||
|
||||
def test(self):
|
||||
url = f"{JIRA_ROOT}/myself"
|
||||
|
||||
response = requests.request(
|
||||
"GET",
|
||||
url,
|
||||
headers=DEFAULT_HEADERS,
|
||||
auth=self.auth
|
||||
)
|
||||
|
||||
return response
|
||||
|
||||
def issue(self, issue_id: str) -> Expando:
|
||||
"""
|
||||
Retrieve an issue
|
||||
|
||||
Reference in New Issue
Block a user