Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
* Fix call to 'strpos' that had the wrong arguments
* Ensure '.git' is stripped from repo names
  • Loading branch information
snim2 committed May 28, 2024
1 parent a66804d commit 41259e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Git/Git.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 41259e1

Please sign in to comment.