From 16b5e5d0592ff442716bc5702fde94d2c02a4971 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 10 Mar 2020 09:13:57 -0700 Subject: push the gitforge branch using Git::Wrapper again. Signed-off-by: Sean Whitton --- Changes | 4 ++++ lib/API/GitForge/Role/GitForge.pm | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index ee813bf..d5d3c2a 100644 --- a/Changes +++ b/Changes @@ -6,6 +6,10 @@ Revision history for API::GitForge - API::GitForge::Role::GitForge::clean_repo(): try to unprotect fork branches before deleting them, if GitForge API library supports doing this. + - API::GitForge::Role::GitForge::clean_repo(): push the gitforge + branch using Git::Wrapper again. + During early testing, this seemed to hang after pushing to + GitLab installations, but it seems to work well now. 0.002 2020-03-09 12:17:47-07:00 America/Phoenix - Implement API::GitForge::GitLab::_ensure_repo(). diff --git a/lib/API/GitForge/Role/GitForge.pm b/lib/API/GitForge/Role/GitForge.pm index c3459bf..3742553 100644 --- a/lib/API/GitForge/Role/GitForge.pm +++ b/lib/API/GitForge/Role/GitForge.pm @@ -120,10 +120,7 @@ sub clean_fork { $git->add("README.md"); $git->commit({ message => "Temporary fork for pull request(s)" }); - # TODO why does Git::Wrapper hang after pushing the branch to - # GitLab? for now, just use system() to do the push ourselves - system "git", "-C", $git->dir, "push", $fork_uri, "master:gitforge"; - + $git->push($fork_uri, "master:gitforge"); $self->_clean_config_fork($_[0]); # assume that if we had to create the gitforge branch, we just -- cgit v1.2.3