[pkg-perl-tools] 03/05: Update Debian::PkgPerl::Message
Alex Muntada
alexm-guest at moszumanska.debian.org
Sat Dec 3 03:58:35 UTC 2016
This is an automated email from the git hooks/post-receive script.
alexm-guest pushed a commit to branch fallback-for-github-pull-requests
in repository pkg-perl-tools.
commit 8942c5909fde9530ffbfb37b36eb167dddf43cad
Author: Alex Muntada <alexm at alexm.org>
Date: Sat Dec 3 04:45:19 2016 +0100
Update Debian::PkgPerl::Message
- Update bug number retrieval.
- Update patch name retrieval.
- Add get_url method.
- Add get_patch method.
---
lib/Debian/PkgPerl/Message.pm | 20 ++++++++++++++++----
t/message.t | 3 ---
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/lib/Debian/PkgPerl/Message.pm b/lib/Debian/PkgPerl/Message.pm
index f1c4d81..d0ff1df 100644
--- a/lib/Debian/PkgPerl/Message.pm
+++ b/lib/Debian/PkgPerl/Message.pm
@@ -50,7 +50,7 @@ sub get_subject {
my $self = shift;
my $info = $self->{info};
- my $patch = $self->{patch};
+ my $patch = $self->{info}{patch};
my $opt_tracker = $self->{tracker};
my $default = $info->{Subject} // '';
@@ -96,10 +96,10 @@ sub prepare_body {
my $self = shift;
my $body;
- my $bug = $self->{bug};
+ my $bug = $self->{info}{bug};
my $opt_dist = $self->{dist};
my $info = $self->{info};
- my $patch = $self->{patch};
+ my $patch = $self->{info}{patch};
my $opt_tracker = $self->{tracker};
my $name = $self->{name};
@@ -183,7 +183,7 @@ sub send_by_mail {
my $name = $self->{name};
my $email = $self->{email};
my $opt_mailto = $self->{mailto};
- my $patch = $self->{patch};
+ my $patch = $self->{info}{patch};
my $opt_tracker_url = $self->{url};
my $from = "$name <$email>";
@@ -229,6 +229,18 @@ sub send_by_mail {
}
}
+sub get_url {
+ my $self = shift;
+
+ return $self->{url};
+}
+
+sub get_patch {
+ my $self = shift;
+
+ return $self->{info}{patch};
+}
+
=head1 LICENSE AND COPYRIGHT
=over
diff --git a/t/message.t b/t/message.t
index 07082af..e62e5cf 100644
--- a/t/message.t
+++ b/t/message.t
@@ -46,7 +46,6 @@ subtest 'Test bug message' => sub {
my $msg = new_ok( 'Debian::PkgPerl::Message', [
%params,
- bug => $bug,
info => \%info,
tracker => 'github',
]);
@@ -67,7 +66,6 @@ subtest 'Test patch message to GitHub' => sub {
my $msg = new_ok( 'Debian::PkgPerl::Message', [
%params,
- patch => $patch,
info => \%info,
tracker => 'github',
url => 'https://github.com/alexm/pkg-perl-dummy/issues',
@@ -90,7 +88,6 @@ subtest 'Test patch message to CPAN' => sub {
my $msg = new_ok( 'Debian::PkgPerl::Message', [
%params,
- patch => $patch,
info => \%info,
tracker => 'cpan',
url => 'https://rt.cpan.org/Public/Dist/Display.html?Name=DUMMY',
--
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