diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-05-24 08:05:20 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-05-24 08:05:20 -0700 |
commit | 15dbf34d4d7ee31cab66f63cca17924476e394ac (patch) | |
tree | 6390d1250ebc6160d0bffe74ed8049de7994bf3e | |
parent | 90e632fe85270a4f66f4a9ff665f8aa8519fbb17 (diff) | |
parent | 1c3a1a8673743cd5d8f9be3670cbf50772043bc5 (diff) | |
download | p5-API-GitForge-15dbf34d4d7ee31cab66f63cca17924476e394ac.tar.gz |
Merge tag 'v0.005' into debian
v0.005
# gpg: Signature made Sun 24 May 2020 08:05:04 AM MST
# gpg: using RSA key 9B917007AE030E36E4FC248B695B7AE4BF066240
# gpg: issuer "spwhitton@spwhitton.name"
# gpg: Good signature from "Sean Whitton <spwhitton@spwhitton.name>" [ultimate]
# Primary key fingerprint: 8DC2 487E 51AB DD90 B5C4 753F 0F56 D055 3B6D 411B
# Subkey fingerprint: 9B91 7007 AE03 0E36 E4FC 248B 695B 7AE4 BF06 6240
-rw-r--r-- | Changes | 6 | ||||
-rw-r--r-- | dist.ini | 2 | ||||
-rw-r--r-- | lib/API/GitForge/GitLab.pm | 7 | ||||
-rw-r--r-- | lib/API/GitForge/Role/GitForge.pm | 3 |
4 files changed, 12 insertions, 6 deletions
@@ -2,6 +2,12 @@ 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 + 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 workaround -- bypass Git::Wrapper when pushing the gitforge @@ -4,7 +4,7 @@ license = GPL_3 copyright_holder = Sean Whitton <spwhitton@spwhitton.name> copyright_year = 2017, 2020 -version = 0.004 +version = 0.005 [PkgVersion] [PodWeaver] 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]); |