From aad814b9732030758d84dcfd5f30490a85ceea03 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Fri, 16 Jan 2026 09:26:32 +0000 Subject: [PATCH 1/4] fix script --- github_scripts/get_git_sources.py | 4 ++-- sbin/gh_manage_labels | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/github_scripts/get_git_sources.py b/github_scripts/get_git_sources.py index af5966c..d28db9f 100644 --- a/github_scripts/get_git_sources.py +++ b/github_scripts/get_git_sources.py @@ -23,7 +23,7 @@ def run_command( command: str, check: bool = True, capture: bool = True, - timeout: int = 300 + timeout: int = 600 ) -> Optional[subprocess.CompletedProcess]: """ Run a subprocess command and return the result object @@ -165,7 +165,7 @@ def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: # Ignore errors - these are likely because the main branch already exists # Instead write them as warnings command = f"git -C {loc} fetch origin main:main" - result = run_command(command, check=False, rval=True) + result = run_command(command, check=False) if result.returncode: print("Warning - fetching main from origin resulted in an error") print("This is likely due to the main branch already existing") diff --git a/sbin/gh_manage_labels b/sbin/gh_manage_labels index 15d78b7..7b3a988 100755 --- a/sbin/gh_manage_labels +++ b/sbin/gh_manage_labels @@ -59,6 +59,7 @@ labels=( "Discussion|#FBCA04|Issues that require some formal discussion" "cla-required|#b60205|The CLA has not yet been signed by the author of this PR - added by GA" "cla-signed|#0052cc|The CLA has been signed as part of this PR - added by GA" + "cla-modified|#F56F27|The CLA has been modified as part of this PR - added by GA" ) # -- Add labels in relevant repositories @@ -77,6 +78,7 @@ repos=( "MetOffice/um_meta" "MetOffice/socrates-spectral" "MetOffice/moci" + "MetOffice/monc" ) # -- Extract labels and colors From 8fef5bb096adf48f3a248130dfbe5ef0b83f3690 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Fri, 16 Jan 2026 09:28:35 +0000 Subject: [PATCH 2/4] fix script --- github_scripts/get_git_sources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_scripts/get_git_sources.py b/github_scripts/get_git_sources.py index d28db9f..2d4966a 100644 --- a/github_scripts/get_git_sources.py +++ b/github_scripts/get_git_sources.py @@ -23,7 +23,7 @@ def run_command( command: str, check: bool = True, capture: bool = True, - timeout: int = 600 + timeout: int = 300 ) -> Optional[subprocess.CompletedProcess]: """ Run a subprocess command and return the result object From ab460c0a984e1224a7feb2029201f96c85b468ed Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Fri, 16 Jan 2026 09:30:10 +0000 Subject: [PATCH 3/4] fix script --- sbin/gh_manage_labels | 2 -- 1 file changed, 2 deletions(-) diff --git a/sbin/gh_manage_labels b/sbin/gh_manage_labels index 7b3a988..15d78b7 100755 --- a/sbin/gh_manage_labels +++ b/sbin/gh_manage_labels @@ -59,7 +59,6 @@ labels=( "Discussion|#FBCA04|Issues that require some formal discussion" "cla-required|#b60205|The CLA has not yet been signed by the author of this PR - added by GA" "cla-signed|#0052cc|The CLA has been signed as part of this PR - added by GA" - "cla-modified|#F56F27|The CLA has been modified as part of this PR - added by GA" ) # -- Add labels in relevant repositories @@ -78,7 +77,6 @@ repos=( "MetOffice/um_meta" "MetOffice/socrates-spectral" "MetOffice/moci" - "MetOffice/monc" ) # -- Extract labels and colors From 7f041812ac26f874b76c0865d9c1369794b8b0db Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Fri, 16 Jan 2026 09:46:12 +0000 Subject: [PATCH 4/4] Update github_scripts/get_git_sources.py Co-authored-by: Yaswant Pradhan <2984440+yaswant@users.noreply.github.com> --- github_scripts/get_git_sources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_scripts/get_git_sources.py b/github_scripts/get_git_sources.py index 2d4966a..519c960 100644 --- a/github_scripts/get_git_sources.py +++ b/github_scripts/get_git_sources.py @@ -166,7 +166,7 @@ def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: # Instead write them as warnings command = f"git -C {loc} fetch origin main:main" result = run_command(command, check=False) - if result.returncode: + if result and result.returncode: print("Warning - fetching main from origin resulted in an error") print("This is likely due to the main branch already existing") print(f"Error message:\n\n{result.stderr}")