Commit ddb9164f authored by Naveen Kumar Sangi's avatar Naveen Kumar Sangi 👽

Issue: Implement JiraIssue for JIRA

parent 439ee8ec
Pipeline #19494059 canceled with stages
in 35 seconds
"""
This contains the Issue implementation for Jira.
"""
from datetime import datetime
from typing import List
from typing import Set
from typing import Union
from urllib.parse import urljoin
from IGitt.Interfaces import get
from IGitt.Interfaces import post
from IGitt.Interfaces import put
from IGitt.Interfaces import IssueStates
from IGitt.Interfaces.Issue import Issue
from IGitt.Interfaces.User import User
from IGitt.Jira import JiraMixin
from IGitt.Jira import JiraOAuth1Token
from IGitt.Jira import JIRA_INSTANCE_URL
from IGitt.Jira.JiraComment import JiraComment
class JiraIssue(JiraMixin, Issue):
"""
This class represents an Issue resource on JIRA.
"""
def __init__(self, token: JiraOAuth1Token, identifier: Union[str, int]):
"""
Instantiates a new JiraIssue object from the given details.
:param token:
The OAuth v1.0 token to be used for authentication with JIRA.
:param identifier:
The unique identifier or key related to the issue resource.
"""
self._identifier = identifier
self._token = token
self._url = '/issue/{}'.format(identifier)
@property
def number(self):
"""
Retrieves the unique identifier of the issue.
:return: An integer representing the id of the issue.
"""
try:
return int(self._identifier)
except ValueError:
return int(self.data['id'])
@property
def web_url(self):
"""
Returns a human accessible web url for the corresponding issue.
:return: A string containing the web link for the issue.
"""
return urljoin(JIRA_INSTANCE_URL,
'/browse/{}'.format(self.data['key']))
@property
def title(self):
"""
Retrieves the title or summary of the issue.
:return: A string containing the title of summary of the issue.
"""
return self.data['fields']['summary']
@title.setter
def title(self, new_title: str):
"""
Sets the title or summary of the issue to the specified title.
:param new_title: The new title to be set on the issue.
"""
data = {'update': {'summary': [{'set': new_title}]}}
put(self._token, self.url, data)
self.data['fields']['summary'] = new_title
@property
def description(self):
"""
Retrieves the description of the issue.
:return: A string containing the description of the issue.
"""
return self.data['fields']['description']
@description.setter
def description(self, new_description):
"""
Sets the description of the issue.
:param new_description: The new description.
"""
data = {'update': {'description': [{'set': new_description}]}}
put(self._token, self.url, data)
self.data['fields']['summary'] = new_description
@property
def assignees(self):
"""
Retrieves the assignees of the issue.
Note: JIRA only allows one assignee per issue.
:return: A set of usernames of assignees.
"""
return {self.data['fields']['assignee']['name']}
@assignees.setter
def assignees(self, value: Set[User]):
"""
Setter for ssignees.
"""
raise NotImplementedError
def assign(self, *usernames: List[User]):
"""
Sets a given users as assignee.
"""
raise NotImplementedError
def unassign(self, *usernames: List[User]):
"""
Unassigns given users from issue.
"""
raise NotImplementedError
@property
def labels(self) -> Set[str]:
"""
Retrieves the set of labels the issue is currently tagged with.
:return: The set of labels.
"""
raise NotImplementedError
@labels.setter
def labels(self, value: Set[str]):
"""
Tags the issue with the given labels. For examples see documentation
of the labels read function.
Labels are added and removed as necessary on remote.
:param value: The new set of labels.
"""
raise NotImplementedError
@property
def available_labels(self) -> Set[str]:
"""
Compiles a set of labels that are available for labelling this issue.
:return: A set of label captions.
"""
raise NotImplementedError
@property
def author(self):
"""
Retrieves the author of the issue.
:return: A string containing the username of author.
"""
return self.data['fields']['creator']['name']
@property
def comments(self) -> Set[JiraComment]:
"""
Retrieves the comments on the issue.
:return: A set of JiraComment instances.
"""
return {
JiraComment.from_data(comment,
self._token,
self._identifier,
comment['id'])
for comment in get(self._token, self.url + '/comment')['comments']
}
def add_comment(self, body) -> JiraComment:
"""
Adds a comment to the issue.
:param body: The content of the comment.
:return: The newly created comment.
:raises RuntimeError: If something goes wrong (network, auth...).
"""
url = self.url + '/comment'
resp = post(self._token, url, data={'body': body})
return JiraComment.from_data(
resp, self._token, self._identifier, resp['id'])
@property
def state(self):
"""
Retrieves the state of the issue. JIRA determines the state of an issue
based on ``resolution`` property of issue resource. If ``resolution``
is ``null``, then the issue is still open, otherwise it has been closed
or resolved.
:return: Either IssueStates.OPEN or IssueStates.CLOSED.
"""
return (IssueStates.CLOSED if self.data['fields']['resolution']
else IssueStates.OPEN)
def close(self):
"""
Closes the issue.
:raises RuntimeError: If something goes wrong (network, auth...).
"""
raise NotImplementedError
def reopen(self):
"""
Reopens the issue.
:raises RuntimeError: If something goes wrong (network, auth...).
"""
raise NotImplementedError
@property
def created(self) -> datetime:
"""
Retrieves a timestamp on when the comment was created.
:return: A datetime.datetime object representing the time of
creation of the issue.
"""
return datetime.strptime(self.data['fields']['created'],
'%Y-%m-%dT%H:%M:%S.%f%z')
@property
def updated(self) -> datetime:
"""
Retrieves a timestamp on when the comment was updated the last time.
:return: A datetime.datetime object representing the last updated
time of the issue.
"""
return datetime.strptime(self.data['fields']['updated'],
'%Y-%m-%dT%H:%M:%S.%f%z')
@property
def reactions(self) -> List[str]:
"""
Retrieves the reactions / award emojis applied on the issue.
"""
raise NotImplementedError
@property
def mrs_closed_by(self) -> Set:
"""
Returns the merge requests that close this issue.
"""
raise NotImplementedError
@staticmethod
def create(token: JiraOAuth1Token,
project: str,
issue_type: str,
title: str,
body: str):
"""
Creates a new issue with the given title and body on the specified
project.
:param token:
The OAuth 1.0 token to be used for authentication.
:param project:
The identifier of the project in which the issue should be opened.
:param issue_type:
The name of the issue type resource to be used.
:param title:
The title of the issue.
:param body:
The description of the issue.
:return:
A new JiraIssue object.
"""
post_url = '/issue/'
data = {
'description': body,
'fields': {
'summary': title,
'issuetype': {'name': issue_type},
'project': {'id': project}
}
}
resp = post(token, JiraIssue.absolute_url(post_url), data)
return JiraIssue(token, resp['id'])
interactions:
- request:
body: '{}'
headers:
Accept:
- !!binary |
Ki8q
Accept-Encoding:
- !!binary |
Z3ppcCwgZGVmbGF0ZQ==
Connection:
- !!binary |
a2VlcC1hbGl2ZQ==
Content-Length: ['2']
Content-Type:
- !!binary |
YXBwbGljYXRpb24vanNvbg==
User-Agent:
- !!binary |
SUdpdHQ=
method: GET
uri: https://jira.gitmate.io/rest/api/2/issue/10002?per_page=100
response:
body:
string: !!binary |
H4sIAAAAAAAAAOxZW3PbthL+Kxw+dHqRJV50s6ZKmjg+Mz6ZtpnUSc/UymQgYimhBgkeANTluPrv
ZwGQEiW7SWS5b3mxiQV2sbvY/RZY3fmwKkhO/ZE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d5kS9F/YRXLdcTFOJi5ndZKvKvr7RnsIVg9UQ+U2VmuVwZBP962P562P54cdy6TCw
0aWJwuuwNwriUS9un/fjukvjLkLHhZ3jseC1/xvE9Zwpz6YO/vWmYNujVlu+tn1XoJ7I6/ZqJkxm
e9O1HdUZ8GW/1exBotPHDPMaUdpF3gDFq9x7U0PNFhlr2y9Q5EzIIyHc8SYVb6f+Aatb5xfLKdZ0
mSE+avNDRSK4kNXJroFz2yl+QD1TmP4PAAD//wMA6C0xvBAcAAA=
headers:
Cache-Control: ['no-cache, no-store, no-transform']
Content-Encoding: [gzip]
Content-Length: ['1862']
Content-Security-Policy: [frame-ancestors 'self']
Content-Type: [application/json;charset=UTF-8]
Date: ['Wed, 21 Mar 2018 19:59:50 GMT']
Set-Cookie: [JSESSIONID=98EA2F1F73D9B6BA74D18A8DC435A390;path=/;HttpOnly, atlassian.xsrf.token=B15V-IRV7-Q0YS-ZCZZ|f28f032e1e15526fa9ec9d98685ed68b96a3917e|lin;path=/]
Strict-Transport-Security: [max-age=315569260; preload]
Vary: [User-Agent]
X-Arequestid: [1199x7091x1]
X-Asen: [SEN-L11373089]
X-Asessionid: [ov794c]
X-Ausername: [nkprince007]
X-Content-Type-Options: [nosniff]
X-Frame-Options: [DENY, SAMEORIGIN]
X-Seraph-Loginreason: [OK]
X-Xss-Protection: [1; mode=block, 1; mode=block]
status: {code: 200, message: OK}
version: 1
interactions:
- request:
body: '{}'
headers:
Accept:
- !!binary |
Ki8q
Accept-Encoding:
- !!binary |
Z3ppcCwgZGVmbGF0ZQ==
Connection:
- !!binary |
a2VlcC1hbGl2ZQ==
Content-Length: ['2']
Content-Type:
- !!binary |
YXBwbGljYXRpb24vanNvbg==
User-Agent:
- !!binary |
SUdpdHQ=
method: GET
uri: https://jira.gitmate.io/rest/api/2/issue/10002?per_page=100
response:
body:
string: !!binary |
H4sIAAAAAAAAAOxZ/2/bthL/VwT9MOxtji1ZtusYz+3aNA/Iim1Fm7bDi4uCkk42F4rUI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+AVUyvcvSMmkn9XPt2G3jhFFe
v1jnQp/Se3HsGzG424yo98K+geuOi+kpMTG1m2xU2dW3u6NwxWA1RH5TpaYcDuyhf3srf3srP/xW
Lh0GNpo03fA67I+CaNSP2ueDqG7SuIvQYWHneCx47f4EcT2jyrOpg/+9GGx31GrLVrbtCqkneN1d
zYXJbC9e2VGdAV/3U80OJDp9zJDXiNIueAMUr7j3uoaaDTLWtl+gyKmQB0K4400q3k79+1Wvzi/K
U6zpMkd81OZ3ikQwIauTXQFjtlH8gHqmMP0NAAD//wMABi+yTA8cAAA=
headers:
Cache-Control: ['no-cache, no-store, no-transform']
Content-Encoding: [gzip]
Content-Length: ['1865']
Content-Security-Policy: [frame-ancestors 'self']
Content-Type: [application/json;charset=UTF-8]
Date: ['Wed, 21 Mar 2018 19:59:53 GMT']
Set-Cookie: [JSESSIONID=E93F8AFFDEC82576CE6730077D62F4C4;path=/;HttpOnly, atlassian.xsrf.token=B15V-IRV7-Q0YS-ZCZZ|55d0a434a3e364944b4dc303faf396d0e217b334|lin;path=/]
Strict-Transport-Security: [max-age=315569260; preload]
Vary: [User-Agent]
X-Arequestid: [1199x7092x1]
X-Asen: [SEN-L11373089]
X-Asessionid: [m30ux]
X-Ausername: [nkprince007]
X-Content-Type-Options: [nosniff]
X-Frame-Options: [DENY, SAMEORIGIN]
X-Seraph-Loginreason: [OK]
X-Xss-Protection: [1; mode=block, 1; mode=block]
status: {code: 200, message: OK}
version: 1
interactions:
- request:
body: '{}'
headers:
Accept:
- !!binary |
Ki8q
Accept-Encoding:
- !!binary |
Z3ppcCwgZGVmbGF0ZQ==
Connection:
- !!binary |
a2VlcC1hbGl2ZQ==
Content-Length: ['2']
Content-Type:
- !!binary |
YXBwbGljYXRpb24vanNvbg==
User-Agent:
- !!binary |
SUdpdHQ=
method: GET
uri: https://jira.gitmate.io/rest/api/2/issue/10001/comment?per_page=100
response:
body:
string: !!binary |
H4sIAAAAAAAAAOyUS4/aMBRG/0rkRTfNJH6EvCQ0RVUX1aizaJlNq2p0iR1wyQPZDjAa8d9rE9ph
0KiFDt2xieKbm2Mn9+h7RNqAMiODcuyjGtafhe4qo1FOcJQOkthHpjVQoZz6qGjrWjTu4bdHpEVV
ohzNjFnoPAx/SAXBVJoajAhkGyqhTQgLGdJQat2JkGCMSbhD9CvkI8kt49cCOjNrFcpPgXdaqGt3
aaAWw4duLu+lvp+0SnBLdEXLOSzPxcMLVVGDrEacW7rePX73tKk73xLsz7pTlXZnjNJ1lO4dcrVa
BVPV9wT2O8P+NhRcQJmRhEdlEpcZm9BJUcakHOBM8Fjgaz6s6zd6aGE+otGaRmeEWpiPSLwm8Rmh
FuYjRteMnhFqYRsfcakXFTzc9nP71M2groF7NyA1KG+k5jNo3CQKI5e2w6hOWENlLb62jXvjgynC
u/F7h5q03E3ZWFe8nXaeq3kz0F5hOdPt1LsFtwMevVq9Zr5QsikExsmTeM+LvXbPawfSNbAUogm0
Pd1Z5EsxJYOMlcDjAR1ASuIoJnjCy5SkrKTsn+Q7FnqSfMdCT5LvWOhL8t1uR+F9caP4k3IjLSG8
aau53dFRCiXs0FyuUUzSK8yuSDzGaY6jnCZBFqdvbdzh3+btN1I2JiynsQ3fADPWN278M4QtY3th
u128Pmwvxl+Mh72k/ehB7YGn2klrgkuyXjz7/8naB2aU5hELsiT7W7IeNG6+b34CAAD//wMAvsTs
MAALAAA=
headers:
Cache-Control: ['no-cache, no-store, no-transform']
Content-Encoding: [gzip]
Content-Length: ['575']
Content-Security-Policy: [frame-ancestors 'self']
Content-Type: [application/json;charset=UTF-8]
Date: ['Fri, 23 Mar 2018 18:38:11 GMT']
Set-Cookie: [JSESSIONID=338724661CB883E3F82AFD580677D744;path=/;HttpOnly, atlassian.xsrf.token=B15V-IRV7-Q0YS-ZCZZ|6d23566bf52696e2a475fc8302300d493c0359da|lin;path=/]
Strict-Transport-Security: [max-age=315569260; preload]
Vary: [User-Agent]
X-Arequestid: [1118x7279x1]
X-Asen: [SEN-L11373089]
X-Asessionid: [jkatgw]
X-Ausername: [nkprince007]
X-Content-Type-Options: [nosniff]
X-Frame-Options: [DENY, SAMEORIGIN]
X-Seraph-Loginreason: [OK]
X-Xss-Protection: [1; mode=block, 1; mode=block]
status: {code: 200, message: OK}
- request:
body: '{"body": "I am a robot."}'
headers:
Accept:
- !!binary |
Ki8q
Accept-Encoding:
- !!binary |
Z3ppcCwgZGVmbGF0ZQ==
Connection:
- !!binary |
a2VlcC1hbGl2ZQ==
Content-Length: ['25']
Content-Type:
- !!binary |
YXBwbGljYXRpb24vanNvbg==
User-Agent:
- !!binary |
SUdpdHQ=
method: POST
uri: https://jira.gitmate.io/rest/api/2/issue/10001/comment
response:
body:
string: !!binary |
H4sIAAAAAAAAAOyUPW/CMBCG/0rkoUtD/BWCiYQoY1WJpe3SzWAHXOI4sh0IQvz32kX9UoeqUkYW
y3c+P3e+9+QTcLKuQAm23reuhPBVWZ5tlNfcy0wZaKXzkLcKEqic6yTECCEM10Zr2fho0RykQInA
+DB457fGgvL0D3jnpJ3HpeFazppda1WzlghNAi+6AuWncyePv3xSc1UvhAhcFw/5Xsomc7zZqLuv
tLHCPffcPtvaxSpz1ufsW5mHwyHb2EtMFl4KL1vIEMHjKa24KMZkzBku8gKjlagYZrQidC5mWt+4
WYClgOQ9yQeEkthZXPS4GBAaYCmgpKdkQGiAnVMglGtrflxetFu+S5E8Rili/9de7YPf206mwCst
X0wT4xZOcfhg6l3IGCkrI6LM9wnXCU+sWRmfhftdK4KWi+ucXedsmDlbWxlEi58YQZiNEB0R+oRZ
Saclphmd0Nvw7aHPyfsz8PwGAAD//wMA5zWs8VkFAAA=
headers:
Cache-Control: ['no-cache, no-store, no-transform']
Content-Encoding: [gzip]
Content-Length: ['374']
Content-Security-Policy: [frame-ancestors 'self']
Content-Type: [application/json;charset=UTF-8]
Date: ['Fri, 23 Mar 2018 18:39:13 GMT']
Location: ['https://jira.gitmate.io/rest/api/2/issue/10001/comment/10034']
Set-Cookie: [JSESSIONID=58D62E4EF812055D77A2AA652EAA346C;path=/;HttpOnly, atlassian.xsrf.token=B15V-IRV7-Q0YS-ZCZZ|d8ae70071253f7505c4abc710663a2d97b4f5fd5|lin;path=/]
Strict-Transport-Security: [max-age=315569260; preload]
Vary: [User-Agent]
X-Arequestid: [1119x7280x1]
X-Asen: [SEN-L11373089]
X-Asessionid: [wyrk4q]
X-Ausername: [nkprince007]
X-Content-Type-Options: [nosniff]
X-Frame-Options: [DENY, SAMEORIGIN]
X-Seraph-Loginreason: [OK]
X-Xss-Protection: [1; mode=block, 1; mode=block]
status: {code: 201, message: Created}
version: 1
interactions:
- request:
body: '{"update": {"description": [{"set": "new description"}]}}'
headers:
Accept:
- !!binary |
Ki8q
Accept-Encoding:
- !!binary |
Z3ppcCwgZGVmbGF0ZQ==
Connection:
- !!binary |
a2VlcC1hbGl2ZQ==
Content-Length: ['57']
Content-Type:
- !!binary |
YXBwbGljYXRpb24vanNvbg==
User-Agent:
- !!binary |
SUdpdHQ=
method: PUT
uri: https://jira.gitmate.io/rest/api/2/issue/10002
response:
body: {string: ''}
headers:
Cache-Control: ['no-cache, no-store, no-transform']
Content-Security-Policy: [frame-ancestors 'self']
Content-Type: [application/json;charset=UTF-8]
Date: ['Fri, 23 Mar 2018 18:07:17 GMT']
Set-Cookie: [JSESSIONID=0B272BEF44D4EC0DDD6D910A5A1EE981;path=/;HttpOnly, atlassian.xsrf.token=B15V-IRV7-Q0YS-ZCZZ|f04423ac62e6cae23e3b6b1d14c2e0f7671c6495|lin;path=/]
Strict-Transport-Security: [max-age=315569260; preload]
X-Arequestid: [1087x7143x1]