From 41522abee916a728d0208dc2224b01f3a0c8b07e Mon Sep 17 00:00:00 2001 From: Ching Date: Wed, 20 Mar 2024 17:53:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96=20l?= =?UTF-8?q?inear=20webhook=20data=20=E5=8F=82=E6=95=B0=E6=9C=89=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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)