functions --------------------------------------------------------------—
Definition at line 19 of file jira_issues.py.
21 base_url =
"https://its.cern.ch/jira/rest/api/2/"
22 url = base_url+querystring
24 r = requests.get(url, cookies=cookies)
25 if r.status_code != 200:
26 if r.status_code == 401:
27 print (
'Authorisation has failed. Have you got a valid SSO cookie? If not, re-run "cern-get-sso-cookie -u https://its.cern.ch/jira/loginCern.jsp -o jira.txt" ')
29 print (
"Something has gone wrong! The response is: ", r.text)
33 response = json.loads(r.text)
36 @acmdlib.command(name=
'jira.issues')
37 @acmdlib.argument(
'-c',
'--cookies',
40 help=
'the CERN SSO cookies file')
41 @acmdlib.argument(
'-r',
'--release',
43 help=
'Limit the response to the specified release')
44 @acmdlib.argument(
'-m',
'--myissues',
48 help=
'Limit the response your own issues')
49 @acmdlib.argument(
'-q',
'--query',
51 help=
'Use the specified query string i.e. "search?jql=assignee=currentUser()+and+resolution=Unresolved"')
52 @acmdlib.argument(
'-s',
'--status',
54 help=
'Limit the search to issues with this status, e.g. "Open"')