fix: 修复获取 linear webhook data 参数有误的问题
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9ae9874491
commit
41522abee9
13
app.py
13
app.py
@ -23,7 +23,7 @@ def linear_issue():
|
|||||||
logger.warning('Ignoring issue action: %s' % data['action'])
|
logger.warning('Ignoring issue action: %s' % data['action'])
|
||||||
return jsonify({'message': 'Ignoring issue action'}), 200
|
return jsonify({'message': 'Ignoring issue action'}), 200
|
||||||
# Send Discord message
|
# Send Discord message
|
||||||
if not data['updateFrom'].get('stateId'):
|
if not data['updatedFrom'].get('stateId'):
|
||||||
logger.warning('Ignoring issue changes')
|
logger.warning('Ignoring issue changes')
|
||||||
return jsonify({'message': 'Ignoring issue changes'}), 200
|
return jsonify({'message': 'Ignoring issue changes'}), 200
|
||||||
apobj = apprise.Apprise()
|
apobj = apprise.Apprise()
|
||||||
@ -39,17 +39,6 @@ def linear_issue():
|
|||||||
apobj.notify(body=body, title=title, notify_type=notify_type)
|
apobj.notify(body=body, title=title, notify_type=notify_type)
|
||||||
return jsonify({'message': 'Ok'}), 200
|
return jsonify({'message': 'Ok'}), 200
|
||||||
|
|
||||||
# if data['updatedFrom'].get('statusId') != data['issue']['statusId']:
|
|
||||||
# logger.info('Issue status changed: %s', data['issue']['status']['name'])
|
|
||||||
# # Send Discord message with embeded content
|
|
||||||
# # set apprise format to markdown
|
|
||||||
# apobj.notify(
|
|
||||||
# body=f'Issue status changed: **{data["issue"]["status"]["name"]}**',
|
|
||||||
# title=data['issue']['title'],
|
|
||||||
# body_format=apprise.AppriseFormat.MARKDOWN
|
|
||||||
# )
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run(host="0.0.0.0", port=5000)
|
app.run(host="0.0.0.0", port=5000)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user