From 41259e198d3980d49d22797cc116a07c905426b2 Mon Sep 17 00:00:00 2001 From: Sarah Mount Date: Tue, 28 May 2024 14:34:25 +0100 Subject: [PATCH] Small fixes * Fix call to 'strpos' that had the wrong arguments * Ensure '.git' is stripped from repo names --- src/Git/Git.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Git/Git.php b/src/Git/Git.php index 8a884e7..7f7973e 100644 --- a/src/Git/Git.php +++ b/src/Git/Git.php @@ -66,7 +66,11 @@ public function check_is_archived_github_repository($repository) return false; } $repo = $substrings[$num_substrings - 1]; - if (false !== strpos($num_substrings, '@')) { + if (false !== strpos($repo, '.git')) { # repo.git + $repo = str_replace('.git', '', $repo); + } + + if (false !== strpos($repository, '@')) { # ssh formatted... $org = explode(':', $substrings[$num_substrings - 2])[1]; } else {