summaryrefslogtreecommitdiff
path: root/lib/API
diff options
context:
space:
mode:
Diffstat (limited to 'lib/API')
-rw-r--r--lib/API/GitForge/GitLab.pm7
-rw-r--r--lib/API/GitForge/Role/GitForge.pm3
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/API/GitForge/GitLab.pm b/lib/API/GitForge/GitLab.pm
index 1e620d8..605b79b 100644
--- a/lib/API/GitForge/GitLab.pm
+++ b/lib/API/GitForge/GitLab.pm
@@ -80,12 +80,11 @@ sub _assert_fork_has_parent {
}
sub _clean_config_repo {
- my ($self, $upstream) = @_;
- my (undef, $repo) = _extract_project_id($upstream);
- my $user = $self->{_api}->current_user->{username};
+ my ($self, $target) = @_;
+ my ($ns, $repo) = _extract_project_id($target);
$self->{_api}->edit_project(
- "$user/$repo",
+ "$ns/$repo",
{
issues_access_level => "disabled",
merge_requests_access_level => "disabled",
diff --git a/lib/API/GitForge/Role/GitForge.pm b/lib/API/GitForge/Role/GitForge.pm
index 953eb91..1301f88 100644
--- a/lib/API/GitForge/Role/GitForge.pm
+++ b/lib/API/GitForge/Role/GitForge.pm
@@ -126,7 +126,8 @@ sub clean_fork {
# but that hangs indefinitely when pushing to (at least) Debian's
# GitLab instance. So just bypass Git::Wrapper and do the push
# ourselves for now
- system qw(git -C), $git->dir, "push", $fork_uri, "master:gitforge";
+ system qw(git -C), $git->dir, "push", $fork_uri, "master:gitforge"
+ or croak "failed to push the gitforge branch to $fork_uri";
$self->_clean_config_fork($_[0]);