diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-05-24 08:02:35 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-05-24 08:02:35 -0700 |
commit | cbbdc5de7d698e92147f3665207d9e170397224d (patch) | |
tree | 6737f6466c58a72e8ee5072aee25330387edbd39 | |
parent | f1118505536fed316ac3d4e882c2ef9e1dc3818d (diff) | |
download | p5-API-GitForge-cbbdc5de7d698e92147f3665207d9e170397224d.tar.gz |
use target project namespace rather than always using the user's
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r-- | Changes | 2 | ||||
-rw-r--r-- | lib/API/GitForge/GitLab.pm | 7 |
2 files changed, 5 insertions, 4 deletions
@@ -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", |