[pkg-perl-tools] 01/01: dpt-salsa: add listrepos function
gregor herrmann
gregoa at debian.org
Sat Jan 27 23:13:25 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 c494af4bf799d7f59c4eb82053ae45095ad1c646
Author: gregor herrmann <gregoa at debian.org>
Date: Sat Jan 27 23:48:30 2018 +0100
dpt-salsa: add listrepos function
---
scripts/salsa | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/scripts/salsa b/scripts/salsa
index 91c5a08..bed84a1 100755
--- a/scripts/salsa
+++ b/scripts/salsa
@@ -94,6 +94,12 @@ if ( $command eq 'version' ) {
or $command eq 'lsmember' )
{
listmembers();
+} elsif ( $command eq 'listrepos'
+ or $command eq 'lsrepos'
+ or $command eq 'listrepo'
+ or $command eq 'lsrepo' )
+{
+ listrepos();
} elsif ( $command eq 'help' ) {
pod2usage(1);
} elsif ( $command eq 'XXX' ) {
@@ -168,6 +174,24 @@ sub listmembers {
}
}
+## listrepos()
+sub listrepos {
+ my $repos = $api->paginator(
+ 'group_projects',
+ $config{'perl_team_modules_packages_id'},
+ { order_by => 'name', sort => 'asc' }
+ )->all();
+ foreach ( @{$repos} ) {
+ if ( $opts{json} ) {
+ say prettyjson($_);
+ } else {
+ say "Id: " . $_->{id};
+ say "Name: " . $_->{name};
+ say "URL: " . $_->{web_url};
+ }
+ }
+}
+
# helper functions
## prettyjson($data)
sub prettyjson {
@@ -221,6 +245,10 @@ B<dpt-salsa> for the first time.
=head2 for managing repositories
+=head3 I<listrepos>
+
+Show all repos in the I<modules> subgroup.
+
=head2 for managing users
=head3 I<adduser> I<username|userid> [access_level]
--
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