From 4d57e0a8dab2139a631a21aab862487481548702 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 22:32:59 +0200 Subject: Adding upstream version 2.23.7. Signed-off-by: Daniel Baumann --- lib/Devscripts/Salsa/join.pm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/Devscripts/Salsa/join.pm (limited to 'lib/Devscripts/Salsa/join.pm') diff --git a/lib/Devscripts/Salsa/join.pm b/lib/Devscripts/Salsa/join.pm new file mode 100644 index 0000000..319e107 --- /dev/null +++ b/lib/Devscripts/Salsa/join.pm @@ -0,0 +1,20 @@ +# Launch request to join a group +package Devscripts::Salsa::join; + +use strict; +use Devscripts::Output; +use Moo::Role; + +sub join { + my ($self, $group) = @_; + unless ($group ||= $self->config->group || $self->config->group_id) { + ds_warn "Group is missing"; + return 1; + } + my $gid = $self->group2id($group); + $self->api->group_access_requests($gid); + ds_warn "Request launched to group $group ($gid)"; + return 0; +} + +1; -- cgit v1.2.3