bts-retitle 1.76 KB
Newer Older
gregoa's avatar
gregoa committed
1 2 3 4 5
#!/bin/bash

# retitle an RFP/O bug to ITP/ITA
#
# Copyright 2010 gregor herrmann <gregoa@debian.org>
Damyan Ivanov's avatar
Damyan Ivanov committed
6
# Copyright 2013 Damyan Ivanov <dmn@debian.org>
Damyan Ivanov's avatar
Damyan Ivanov committed
7 8 9 10
#
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.

gregoa's avatar
gregoa committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

usage() {
	echo "Usage: $(basename $0) <bug number> <ITP|ITA>"
	exit 1
}

[ $# == 2 ] || usage

BUG="$1"
NEW="$2"

SUBJECT=$(bts status "$BUG" | perl -ne "print if s/subject\s(.+)/\1/ && s/^\w+:/${NEW}:/")

echo "run the following command?"
echo bts retitle "$BUG" "$SUBJECT" . owner "$BUG" \!
read -n 1 -p "y/N" SEND
if [ "$SEND" == "y" ] ; then
	bts retitle "$BUG" "$SUBJECT" . owner "$BUG" \!
fi
Damyan Ivanov's avatar
Damyan Ivanov committed
30 31 32 33 34 35

exit 0

POD=<<EOF
=head1 NAME

36
bts-retitle -- note your intention to package a RFP/adopt a RFA
Damyan Ivanov's avatar
Damyan Ivanov committed
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77

=head1 SYNOPSIS

B<bts-retitle> I<bug number> ITP

B<bts-retitle> I<bug-number> ITA

=head1 DESCRIPTION

B<bts-retitle> is a small wrapper around the L<bts(1)> command for easy
changing the C<RFP>/C<RFA> prefix of a bug report in the Debian bug tracking
system to C<ITP>/C<ITA>.

B<bts-retitle> also sets the owner of the bug report to the current user, after
asking for confirmation.

=head1 CAVEATS

=over

=item Working local mail setup required

Since B<bts-retitle> uses L<bts(1)>, it requires that the local machine has a
working mail setup and is able to send mails to the Debian bug tracking system.

=back

=head1 INVENTORY

=over

=item RFP

Request for a package

=item RFA

Request for adoption of a package

=item ITP

Damyan Ivanov's avatar
Damyan Ivanov committed
78
Intent to package
Damyan Ivanov's avatar
Damyan Ivanov committed
79 80 81 82 83 84 85 86 87 88 89

=item ITA

Intent to adopt a package

=back

=head1 COPYRIGHT & LICENSE

Copyright 2010 gregor herrmann <gregoa@debian.org>
Copyright 2013 Damyan Ivanov <dmn@debian.org>
Damyan Ivanov's avatar
Damyan Ivanov committed
90 91 92

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Damyan Ivanov's avatar
Damyan Ivanov committed
93 94 95

=cut
EOF