[pkg-perl-tools] 01/05: dpt-salsa: we have a group and subgroups now
gregor herrmann
gregoa at debian.org
Sat Jan 27 21:58:41 UTC 2018
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository pkg-perl-tools.
commit 7633899ecb15806c4a48549aeb76b6caa63c71ce
Author: gregor herrmann <gregoa at debian.org>
Date: Sat Jan 27 22:10:43 2018 +0100
dpt-salsa: we have a group and subgroups now
update variables and documentation
Gbp-Dch: Ignore
---
scripts/salsa | 88 +++++++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 68 insertions(+), 20 deletions(-)
diff --git a/scripts/salsa b/scripts/salsa
index 885842e..448e706 100755
--- a/scripts/salsa
+++ b/scripts/salsa
@@ -15,10 +15,18 @@ use JSON;
# config
## defaults
my %config = (
- api_url => 'https://salsa.debian.org/api/v4',
- private_token => '',
- pkg_perl_path => 'pkg-perl-team',
- pkg_perl_id => 42,
+ api_url => 'https://salsa.debian.org/api/v4',
+ private_token => '',
+ perl_team_path => 'perl-team',
+ perl_team_id => 2663,
+ perl_team_interpreter_path => 'perl-team/interpreter',
+ perl_team_interpreter_id => 2664,
+ perl_team_modules_path => 'perl-team/modules',
+ perl_team_modules_id => 2665,
+ perl_team_modules_packages_path => 'perl-team/modules/packages',
+ perl_team_modules_packages_id => 2666,
+ perl_team_modules_attic_path => 'perl-team/modules/attic',
+ perl_team_modules_attic_id => 2667,
);
## update from environment / config file
@@ -123,7 +131,7 @@ sub adduser {
die "Unknown access level '$level'." unless $access_level;
...;
- $api->add_group_member( $config{'pkg_perl_id'},
+ $api->add_group_member( $config{'perl_team_modules_id'},
{ user_id => $user_id, access_level => $access_level } );
}
@@ -133,12 +141,12 @@ sub removeuser {
die 'Required parameter username|userid missing.' unless $user;
my $user_id = user2userid($user);
...;
- $api->remove_group_member( $config{'pkg_perl_id'}, $user_id );
+ $api->remove_group_member( $config{'perl_team_modules_id'}, $user_id );
}
## listmembers()
sub listmembers {
- my $members = $api->group_members( $config{'pkg_perl_id'} );
+ my $members = $api->group_members( $config{'perl_team_modules_id'} );
...;
foreach ( @{$members} ) {
if ( $opts{json} ) {
@@ -181,7 +189,7 @@ __END__
=head1 NAME
-B<dpt-salsa> - manage repositories and members of the I<pkg-perl-team> group on I<salsa.debian.org>
+B<dpt-salsa> - manage repositories and members of the I<perl-team> on I<salsa.debian.org>
=head1 SYNOPSIS
@@ -190,12 +198,12 @@ B<dpt salsa> [--help|--man|--json] I<subcommand> [parameters]
=head1 DESCRIPTION
B<dpt-salsa> is basically a wrapper around L<GitLab::API::v4>, similar to
-L<gitlab-api-v4(1)>, with various variables regarding I<salsa.debian.org> and
-the I<pkg-perl-team> group there already preset and typical method calls
-encapsulated.
+L<gitlab-api-v4(1)>, with various variables regarding I<salsa.debian.org>
+and the I<modules> subgroup of the I<perl-team> group already preset and
+typical method calls encapsulated.
-It offers subcommands to manage repositories and members of the group with
-hopefully less typing then calling the API manually each time.
+It offers subcommands to manage repositories and members of the I<modules>
+subgroup with hopefully less typing then calling the API manually each time.
Make sure to check the L</CONFIGURATION> section below if you use
B<dpt-salsa> for the first time.
@@ -208,7 +216,7 @@ B<dpt-salsa> for the first time.
=head3 I<adduser> I<username|userid> [access_level]
-Adds a user to the I<pkg-perl-team> group.
+Adds a user to the I<modules> subgroup of the I<perl-team> group.
Parameters:
@@ -228,7 +236,7 @@ Optional, defaults to C<master>.
=head3 I<removeuser> I<username|userid>
-Removes a user from the I<pkg-perl-team> group.
+Removes a user from the I<modules> subgroup of the I<perl-team> group.
Parameters:
@@ -243,7 +251,7 @@ Required.
=head3 I<listmembers>
-Show all members of the I<pkg-perl-team>.
+Show all members of the I<modules> subgroup of the I<perl-team> group.
=head2 others
@@ -295,18 +303,58 @@ required, no default, obviously
optional, default: https://salsa.debian.org/api/v4
-=item DPT_SALSA_PKG_PERL_PATH
+=item DPT_SALSA_PERL_TEAM_PATH
-optional, default: pkg-perl-team
+optional, default: perl-team
-=item DPT_SALSA_PKG_PERL_ID
+=item DPT_SALSA_PERL_TEAM_ID
-optional, default: 42
+optional, default: 2663
+
+=item DPT_SALSA_PERL_TEAM_INTERPRETER_PATH
+
+optional, default: perl-team/interpreter
+
+=item DPT_SALSA_PERL_TEAM_INTERPRETER_ID
+
+optional, default: 2664
+
+=item DPT_SALSA_PERL_TEAM_MODULES_PATH
+
+optional, default: perl-team/modules
+
+=item DPT_SALSA_PERL_TEAM_MODULES_ID
+
+optional, default: 2665
+
+=item DPT_SALSA_PERL_TEAM_MODULES_PACKAGES_PATH
+
+optional, default: perl-team/modules/packages
+
+=item DPT_SALSA_PERL_TEAM_MODULES_PACKAGES_ID
+
+optional, default: 2666
+
+=item DPT_SALSA_PERL_TEAM_MODULES_ATTIC_PATH
+
+optional, default: perl-team/modules/attic
+
+=item DPT_SALSA_PERL_TEAM_MODULES_ATTIC_ID
+
+optional, default: 2667
=back
Cf. L<dpt-config(5)>.
+=head1 SEE ALSO
+
+L<https://salsa.debian.org/perl-team>
+
+L<GitLab::API::v4>
+
+L<https://docs.gitlab.com/ce/api/>
+
=head1 COPYRIGHT AND LICENSE
Copyright 2018, gregor herrmann E<lt>gregoa at debian.orgE<gt>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git
More information about the Pkg-perl-cvs-commits
mailing list