diff --git a/app.py b/app.py index 4bdb53b..6a36e08 100644 --- a/app.py +++ b/app.py @@ -23,7 +23,7 @@ def linear_issue(): logger.warning('Ignoring issue action: %s' % data['action']) return jsonify({'message': 'Ignoring issue action'}), 200 # Send Discord message - if not data['updateFrom'].get('stateId'): + if not data['updatedFrom'].get('stateId'): logger.warning('Ignoring issue changes') return jsonify({'message': 'Ignoring issue changes'}), 200 apobj = apprise.Apprise() @@ -39,17 +39,6 @@ def linear_issue(): apobj.notify(body=body, title=title, notify_type=notify_type) 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__": app.run(host="0.0.0.0", port=5000)