diff options
Diffstat (limited to 'lib/API')
-rw-r--r-- | lib/API/GitForge/GitLab.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/API/GitForge/GitLab.pm b/lib/API/GitForge/GitLab.pm index b264eb9..12d318b 100644 --- a/lib/API/GitForge/GitLab.pm +++ b/lib/API/GitForge/GitLab.pm @@ -70,12 +70,11 @@ sub _ensure_fork { sub _assert_fork_has_parent { my ($self, $upstream) = @_; - my (undef, $repo) = _extract_project_id($upstream); + my ($path, $repo) = _extract_project_id($upstream); my $user = $self->{_api}->current_user->{username}; my $fork = $self->{_api}->project("$user/$repo"); - $upstream =~ s/\.git$//; - $fork->{forked_from_project}{path_with_namespace} eq $upstream + $fork->{forked_from_project}{path_with_namespace} eq $path . "/" . $repo or croak "$user/$repo does not have parent $upstream; don't know what to do"; } |