Форум сайта python.su
Доброго дня. Делаю дискорд бота и там имеет место вебхук.
url = 'https://webhook.site/#!/4cf42122-bdea-4d0b-a122-82d26c1c34f9/363f047f-df4a-420f-8851-199b02aa2658' jql = 'project = ABC AND issuetype = Bug and assignee = currentUser()' encoded_body = json.dumps({ "name": "webhook", "url": url, "events": [ "jira:issue_updated" ], "JQL": jql, "excludeIssueDetails": False }) url = '{}/rest/webhooks/1.0/webhook'.format(self.config['jira']['server']) headers = {'Content-type': 'application/json', 'Accept': 'application/json', 'Content-Encoding': 'utf-8'} answer = requests.post(url, auth=(self.config['jira']['user'], self.config['jira']['password']), data=encoded_body, headers=headers )
Отредактировано Artegr (Май 4, 2019 22:59:17)
Офлайн