fix: 修复绑定 linear issue url 时报错的问题 TUN-85
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Ching 2024-05-10 11:38:58 +08:00
parent f2d8b30e08
commit 4ae7a1cd49

5
app.py
View File

@ -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)