Skip to content

Commit

Permalink
Merge pull request #31 from zero-24/patch-1
Browse files Browse the repository at this point in the history
add urlencode($name) as per comment in joomla/jissues#893
  • Loading branch information
mbabker authored Oct 16, 2016
2 parents be7ae5a + d141d23 commit ad223ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Package/Issues/Labels.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function getList($owner, $repo)
public function get($user, $repo, $name)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/labels/' . $name;
$path = '/repos/' . $user . '/' . $repo . '/labels/' . urlencode($name);

// Send the request.
return $this->processResponse(
Expand Down Expand Up @@ -84,7 +84,7 @@ public function create($owner, $repo, $name, $color)
$data = json_encode(
array(
'name' => $name,
'color' => $color
'color' => $color,
)
);

Expand All @@ -106,7 +106,7 @@ public function create($owner, $repo, $name, $color)
public function delete($owner, $repo, $name)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/labels/' . $name;
$path = '/repos/' . $owner . '/' . $repo . '/labels/' . urlencode($name);

// Send the request.
return $this->processResponse(
Expand Down Expand Up @@ -137,7 +137,7 @@ public function update($user, $repo, $label, $name, $color)
$data = json_encode(
array(
'name' => $name,
'color' => $color
'color' => $color,
)
);

Expand Down Expand Up @@ -207,7 +207,7 @@ public function add($owner, $repo, $number, array $labels)
public function removeFromIssue($owner, $repo, $number, $name)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/issues/' . $number . '/labels/' . $name;
$path = '/repos/' . $owner . '/' . $repo . '/issues/' . $number . '/labels/' . urlencode($name);

// Send the request.
return $this->processResponse(
Expand Down

0 comments on commit ad223ab

Please sign in to comment.