From f1118505536fed316ac3d4e882c2ef9e1dc3818d Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 17 Mar 2020 11:32:10 -0700 Subject: don't continue if fail to push the gitforge branch Signed-off-by: Sean Whitton --- Changes | 2 ++ lib/API/GitForge/Role/GitForge.pm | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index f678f79..fd4b038 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for API::GitForge {{$NEXT}} + - API::GitForge::Role::GitForge::clean_repo(): don't continue if + fail to push the gitforge branch. 0.004 2020-03-13 17:28:05-07:00 America/Phoenix - API::GitForge::Role::GitForge::clean_repo(): reinstate 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]); -- cgit v1.2.3 From cbbdc5de7d698e92147f3665207d9e170397224d Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 24 May 2020 08:02:35 -0700 Subject: use target project namespace rather than always using the user's Signed-off-by: Sean Whitton --- Changes | 2 ++ lib/API/GitForge/GitLab.pm | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index fd4b038..fa14948 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,8 @@ Revision history for API::GitForge {{$NEXT}} - API::GitForge::Role::GitForge::clean_repo(): don't continue if fail to push the gitforge branch. + - API::GitForge::GitLab::_clean_config_repo(): use target project + namespace rather than always using the user's namespace. 0.004 2020-03-13 17:28:05-07:00 America/Phoenix - API::GitForge::Role::GitForge::clean_repo(): reinstate 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", -- cgit v1.2.3 From 87da900e51fb8a10c7b36c11c7f040ebf876753d Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 24 May 2020 08:04:41 -0700 Subject: bump version Signed-off-by: Sean Whitton --- dist.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.ini b/dist.ini index 7dccb21..3be89a7 100644 --- a/dist.ini +++ b/dist.ini @@ -4,7 +4,7 @@ license = GPL_3 copyright_holder = Sean Whitton copyright_year = 2017, 2020 -version = 0.004 +version = 0.005 [PkgVersion] [PodWeaver] -- cgit v1.2.3 From 1c3a1a8673743cd5d8f9be3670cbf50772043bc5 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 24 May 2020 08:05:04 -0700 Subject: v0.005 - API::GitForge::Role::GitForge::clean_repo(): don't continue if fail to push the gitforge branch. - API::GitForge::GitLab::_clean_config_repo(): use target project namespace rather than always using the user's namespace. Signed-off-by: Sean Whitton --- Changes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changes b/Changes index fa14948..1fbbfea 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for API::GitForge {{$NEXT}} + +0.005 2020-05-24 08:04:55-07:00 America/Phoenix - API::GitForge::Role::GitForge::clean_repo(): don't continue if fail to push the gitforge branch. - API::GitForge::GitLab::_clean_config_repo(): use target project -- cgit v1.2.3