From 6e636e823a5a16dccb8e58e50ba15989cdd34e6c Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Wed, 25 Aug 2021 10:10:44 -0500 Subject: [PATCH] Fixing a max length error on deploy/publish script with GitHub API, and adding better errors for GitHub specific issues. --- installer/deploy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/installer/deploy.py b/installer/deploy.py index 9335bf0d70..838d230001 100644 --- a/installer/deploy.py +++ b/installer/deploy.py @@ -33,6 +33,7 @@ import re import urllib3 from github3 import login +from github3.models import GitHubError from requests.auth import HTTPBasicAuth from requests import post, get, head from build_server import ( @@ -185,7 +186,7 @@ def main(): github_release_name, target_commitish=git_branch_name, prerelease=True, - body=formatted_logs.get(repo_name)) + body=formatted_logs.get(repo_name)[:125000]) # Upload all deploy artifacts/installers to GitHub # NOTE: ONLY for `openshot-qt` repo @@ -367,6 +368,8 @@ def main(): except Exception as ex: tb = traceback.format_exc() error("Unhandled %s exception: %s - %s" % (script_mode, str(ex), str(tb))) + if type(ex) == GitHubError: + error(str(ex.errors)) if not errors_detected: output("Successfully completed %s script!" % script_mode)