functions --------------------------------------------------------------—
Definition at line 21 of file jira_issues.py.
23 base_url =
"https://its.cern.ch/jira/rest/api/2/"
24 url = base_url+querystring
26 r = requests.get(url, cookies=cookies)
27 if r.status_code != 200:
28 if r.status_code == 401:
29 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" ')
31 print (
"Something has gone wrong! The response is: ", r.text)
35 response = json.loads(r.text)
38 @acmdlib.command(name=
'jira.issues')
39 @acmdlib.argument(
'-c',
'--cookies',
42 help=
'the CERN SSO cookies file')
43 @acmdlib.argument(
'-r',
'--release',
45 help=
'Limit the response to the specified release')
46 @acmdlib.argument(
'-m',
'--myissues',
50 help=
'Limit the response your own issues')
51 @acmdlib.argument(
'-q',
'--query',
53 help=
'Use the specified query string i.e. "search?jql=assignee=currentUser()+and+resolution=Unresolved"')
54 @acmdlib.argument(
'-s',
'--status',
56 help=
'Limit the search to issues with this status, e.g. "Open"')