in notifier.py [0:0]
def jira_remote_link(self, ticket, url, prno):
"""Post JIRA remote link to GitHub PR/Issue"""
urlid = url.split("#")[0] # Crop out anchor
data = {
"globalId": "github=%s" % urlid,
"object": {
"url": urlid,
"title": "GitHub Pull Request #%s" % prno,
"icon": {"url16x16": "https://github.com/favicon.ico"},
},
}
rv = requests.post(
"https://issues.apache.org/jira/rest/api/latest/issue/%s/remotelink" % ticket,
headers=JIRA_HEADERS,
auth=JIRA_AUTH,
json=data,
)
if rv.status_code == 200 or rv.status_code == 201:
return "Updated JIRA Ticket %s" % ticket
else:
raise Exception(rv.text)