Permalink
Browse files

dots in labels must be escaped, or we fail with an 'api route not rec…

…ognized' error
  • Loading branch information...
1 parent 057cab2 commit 0e036597f15673d9c01107444835342d86a70034 @dave0 committed May 22, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 gcode-issue-import
View
@@ -248,7 +248,7 @@ sub import_issue
package Private::Net::GitHub::Issue;
use Carp qw(confess);
-
+use URI::Escape;
sub _throttle_request_rate
{
@@ -290,14 +290,14 @@ sub add_label
{
my ($self, $label) = @_;
_throttle_request_rate();
- _die_if_error( $self->{_gi}->add_label($self->{number}, $label ) );
+ _die_if_error( $self->{_gi}->add_label($self->{number}, uri_escape($label, "^A-Za-z0-9\-_~") ) );
}
sub remove_label
{
my ($self, $label) = @_;
_throttle_request_rate();
- _die_if_error( $self->{_gi}->remove_label($self->{number}, $label ) );
+ _die_if_error( $self->{_gi}->remove_label($self->{number}, uri_escape($label, "^A-Za-z0-9\-_~" ) ) );
}
sub edit

0 comments on commit 0e03659

Please sign in to comment.