From 4ae7a1cd4917e0e97c9235c9cd57cbee8e37f4bb Mon Sep 17 00:00:00 2001 From: Ching Date: Fri, 10 May 2024 11:38:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BB=91=E5=AE=9A=20l?= =?UTF-8?q?inear=20issue=20url=20=E6=97=B6=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20TUN-85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index cdc7dbd..a1f93e9 100644 --- a/app.py +++ b/app.py @@ -81,6 +81,9 @@ def _attach_url_to_issue(issue_id, url, title=None): if resp.status_code != 200: logger.error('Failed to attach url to issue: %s' % resp.text) return False + if not resp.json().get('data', {}): + logger.error('Failed to attach url to issue: %s' % resp.text) + return False if not resp.json().get('data', {}).get('attachmentLinkURL', {}).get('success'): logger.error('Failed to attach url to issue: %s' % resp.text) return False @@ -180,4 +183,4 @@ def sentry_event(): if __name__ == "__main__": - app.run(host="0.0.0.0", port=5000) + app.run(host="0.0.0.0", port=5050)