lib/Github/Api/Issue/Labels.php
public function add($username, $repository, $issue, $labels)
    {
        if (is_string($labels)) {
            $labels = [$labels];
        } elseif (0 === count($labels)) {
            throw new InvalidArgumentException('The labels parameter should be a single label or an array of labels');
        }

        return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/labels', $labels);
    }
public function add($username, $repository, $issue, $labels)
    {
        if (is_string($labels)) {
            $labels = [$labels];
        } elseif (0 === count($labels)) {
            throw new InvalidArgumentException('The labels parameter should be a single label or an array of labels');
        }

        return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/labels', $labels);
    }
public function add ( $ username , $ repository , $ issue , $ labels ) { if ( is_string ( $ labels ) ) { $ labels = [ $ labels ] ; } elseif ( 0 === count ( $ labels ) ) { throw new InvalidArgumentException ( 'The labels parameter should be a single label or an array of labels' ) ; } return $ this -> post ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/issues/' . rawurlencode ( $ issue ) . '/labels' , $ labels ) ; }
Add a label to an issue.

@link https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue

@param string       $username
@param string       $repository
@param int          $issue
@param string|array $labels

@return array

@thorws \Github\Exception\InvalidArgumentException
Add a label to an issue .