From 8a43683805671941470bbf41fbc9fa0d5420dfac Mon Sep 17 00:00:00 2001 From: Ethan Holz Date: Mon, 5 Aug 2024 17:09:00 -0500 Subject: [PATCH] refactor(gh): simplify the logic for the timeout --- src/gha_runner/__main__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gha_runner/__main__.py b/src/gha_runner/__main__.py index 941e192..b01acb1 100644 --- a/src/gha_runner/__main__.py +++ b/src/gha_runner/__main__.py @@ -146,12 +146,9 @@ def main(): # pragma: no cover provider = os.environ.get("INPUT_PROVIDER") if provider is None: raise Exception("Missing required input variable INPUT_PROVIDER") - gh_timeout_var = os.environ.get("INPUT_GH_TIMEOUT") - # Set the default timeout to 10 minutes + # Set the default timeout to 20 minutes + gh_timeout = int(os.environ.get("INPUT_GH_TIMEOUT", 1200)) gh_timeout = 1200 - # If the user has set the timeout, we will use that instead - if gh_timeout_var is not None: - gh_timeout = int(gh_timeout_var) gha_params = { "token": os.environ["GH_PAT"],