Remove all labels from an issue.

@link https://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue

@param string $username
@param string $repository
@param string $issue

@return array|string
480507
public function clear($username, $repository, $issue)
    {
        return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/labels');
    }
303185
public function hasLabelOfNameAndUserId(string $labelName, string $userId): bool
    {
        /* @var GmailLabelInterface $label */
        if ($this->getLabelOfNameAndUserId($labelName, $userId) instanceof GmailLabelInterface) {
            return true;
        }

        return false;
    }
1245997
def RemoveClientLabels(self, client_id, owner, labels, cursor=None):
    """"""

    query = ("DELETE FROM client_labels "
             "WHERE client_id = %s AND owner_username_hash = %s "
             "AND label IN ({})").format(", ".join(["%s"] * len(labels)))
    args = [db_utils.ClientIDToInt(client_id), mysql_utils.Hash(owner)] + labels
    cursor.execute(query, args)
1087132
public function create($username, $repository, array $params)
    {
        if (!isset($params['tree']) || !is_array($params['tree'])) {
            throw new MissingArgumentException('tree');
        }

        if (!isset($params['tree'][0])) {
            $params['tree'] = [$params['tree']];
        }

        foreach ($params['tree'] as $key => $tree) {
            if (!isset($tree['path'], $tree['mode'], $tree['type'])) {
                throw new MissingArgumentException(["tree.$key.path", "tree.$key.mode", "tree.$key.type"]);
            }

            // If `sha` is not set, `content` is required
            if (!isset($tree['sha']) && !isset($tree['content'])) {
                throw new MissingArgumentException("tree.$key.content");
            }
        }

        return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/trees', $params);
    }
148877
def sort_labeled_issues(issues)
      sorted_issues = []
      issues.each do |issue|
        label_names = issue["labels"].collect { |l| l["name"] }

        # Add PRs in the order of the @sections array. This will either be the
        # default sections followed by any --add-sections sections in
        # user-defined order, or --configure-sections in user-defined order.
        # Ignore the order of the issue labels from github which cannot be
        # controled by the user.
        @sections.each do |section|
          unless (section.labels & label_names).empty?
            section.issues << issue
            sorted_issues << issue
            break
          end
        end
      end
      issues - sorted_issues
    end
1360462
function removeUser($username)
    {
        $query = sprintf("DELETE FROM %s WHERE %s = '%s'",
                         $this->options['table'],
                         $this->options['usernamecol'],
                         $username
                         );

        $res = $this->query($query);

        if (DB::isError($res)) {
           return PEAR::raiseError($res->getMessage(), $res->getCode());
        } else {
          return true;
        }
    }
56992
public function permission($username, $repository, $collaborator)
    {
        return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/collaborators/'.rawurlencode($collaborator).'/permission');
    }
943359
def RemoveLabels(self, labels_names, owner=None):
    """"""
    if owner is None and not self.token:
      raise ValueError("Can't remove label: No owner specified and "
                       "no access token available.")
    if isinstance(labels_names, string_types):
      raise ValueError("Label list can't be string.")

    owner = owner or self.token.username

    current_labels = self.Get(self.Schema.LABELS)
    for label_name in labels_names:
      label = rdf_aff4.AFF4ObjectLabel(name=label_name, owner=owner)
      current_labels.RemoveLabel(label)

    self.Set(self.Schema.LABELS, current_labels)
1084399
public function lock($username, $repository, $id)
    {
        return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($id).'/lock');
    }
944170
public function all($username, $repository, $pullRequest, array $params = [])
    {
        return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/requested_reviewers', $params);
    }
754449
public function getLabelOfUserId(string $userId)
    {
        foreach ($this->labels as $label) {
            /** @var GmailLabelInterface $label */
            if ($label->getUserId() === $userId) {
                return $label;
            }
        }

        return;
    }
1218280
public function update($username, $repository, $checkRunId, array $params = [])
    {
        // This api is in preview mode, so set the correct accept-header.
        $this->acceptHeaderValue = 'application/vnd.github.antiope-preview+json';

        return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/check-runs/'.rawurlencode($checkRunId), $params);
    }
1016791
public static function deleteUser($username)
	{
		if ( ! self::userExists( $username ) ) return false;

		$deleted_user = self::$auth['users'][ $username ];
		unset( self::$auth['users'][ $username ] );

		return $deleted_user;
	}
709466
public function removeMention($username)
    {
        if (
            $mentioned = $this->getService('repos:people.person')->find(array('username' => $username))
        ) {
            $this->mentions->extract($mentioned);

            if ($this->_mixer->isSubscribable() && $this->_mixer->subscribed($mentioned)) {
                $this->_mixer->removeSubscriber($mentioned);
            }

            return $this;
        } else {
            $this->invalidateUsername($username);

            return;
        }
    }
486654
public function remove($username, $repository, $pullRequest, array $reviewers)
    {
        return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/requested_reviewers', ['reviewers' => $reviewers]);
    }
542173
public function deleteUser($username) {
    $users = \Drupal::entityQuery('user')
      ->condition("name", $username)
      ->execute();

    /** @var \Drupal\user\Entity\User $users */
    $users = User::loadMultiple($users);
    foreach ($users as $user) {
      $user->delete();
    }
  }
1033444
public static function delete_label(
		$project,
		$label,
		$args = []
	) {
		$request_url = sprintf(
			self::API_ROOT . 'repos/%s/labels/%s',
			$project,
			$label
		);

		$headers['http_verb'] = 'DELETE';

		list( $body, $headers ) = self::request( $request_url, $args, $headers );

		return $body;
	}