[Bps-public-commit] r18315 - in Net-Google-Code/branches/write: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Feb 10 06:44:19 EST 2009
Author: sunnavy
Date: Tue Feb 10 06:44:12 2009
New Revision: 18315
Modified:
Net-Google-Code/branches/write/ (props changed)
Net-Google-Code/branches/write/lib/Net/Google/Code/Issue.pm
Log:
r19743 at sunnavys-mb: sunnavy | 2009-02-10 19:42:52 +0800
added files arg for update, though it does not work yet right now
Modified: Net-Google-Code/branches/write/lib/Net/Google/Code/Issue.pm
==============================================================================
--- Net-Google-Code/branches/write/lib/Net/Google/Code/Issue.pm (original)
+++ Net-Google-Code/branches/write/lib/Net/Google/Code/Issue.pm Tue Feb 10 06:44:12 2009
@@ -141,6 +141,7 @@
@_,
{
labels => { type => HASHREF | ARRAYREF, optional => 1 },
+ files => { type => ARRAYREF, optional => 1 },
map { $_ => { type => SCALAR, optional => 1 } }
qw/comment summary status owner merge_into cc blocked_on/,
}
@@ -154,9 +155,18 @@
$self->sign_in;
$self->fetch( 'issues/detail?id=' . $self->id );
+
$self->mech->form_with_fields( 'comment', 'summary' );
$self->mech->field( 'label', $args{labels} );
+
+ # the page doesn't have any file field yet :/
+ if ( $args{files} ) {
+ for ( my $i = 0; $i < scalar @{ $args{files} }; $i++ ) {
+ $self->mech->field( 'file' . ($i + 1), $args{files}[$i] );
+ }
+ }
+
$self->mech->submit_form(
fields => {
map { $_ => $args{$_} }
@@ -224,7 +234,10 @@
=head2 description
=head2 update
-comment, summary, status, owner, merge_into, cc, labels, blocked_on
+comment, summary, status, owner, merge_into, cc, labels, blocked_on, files.
+
+Caveat: currently, 'files' field doesn't work right now, please don't try to
+use it.
=head1 AUTHOR
More information about the Bps-public-commit
mailing list