summaryrefslogtreecommitdiffstats
path: root/lib/Devscripts/Salsa/join.pm
blob: 319e10751bf6a1220f08b866f0c4a865f17500f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;