<commit_before><?php

namespace Github\Api\GitData;

use Github\Api\AbstractApi;
use Github\Exception\MissingArgumentException;

/**
 * @link   http://developer.github.com/v3/git/tags/
 * @author <NAME> <<EMAIL>>
 */
class Tags extends AbstractApi
{
    /**
     * Get all tags for a repository.
     *
     * @param string $username
     * @param string $repository
     *
     * @return array
     */
    public function all($username, $repository)
    {
        return $this->get('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/tags');
    }

    /**
     * Get a tag for a repository.
     *
     * @param string $username
     * @param string $repository
     * @param string $sha
     *
     * @return array
     */
    public function show($username, $repository, $sha)
    {
        return $this->get('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/tags/'.rawurlencode($sha));
    }

    /**
     * Create a tag for a repository.
     *
     * @param string $username
     * @param string $repository
     * @param array  $params
     *
     * @return array
     *
     * @throws \Github\Exception\MissingArgumentException
     */
    public function create($username, $repository, array $params)
    {
        if (!isset($params['tag'], $params['message'], $params['object'], $params['type'])) {
            throw new MissingArgumentException(array('tag', 'message', 'object', 'type'));
        }

        if (!isset($params['tagger'])) {
            throw new MissingArgumentException('tagger');
        }

        if (!isset($params['tagger']['name'], $params['tagger']['email'], $params['tagger']['date'])) {
            throw new MissingArgumentException(array('tagger.name', 'tagger.email', 'tagger.date'));
        }

        return $this->post('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/tags', $params);
    }
}
<commit_msg>Added missing parameters to repo/tags API<commit_after><?php

namespace Github\Api\GitData;

use Github\Api\AbstractApi;
use Github\Exception\MissingArgumentException;

/**
 * @link   http://developer.github.com/v3/git/tags/
 * @author <NAME> <<EMAIL>>
 */
class Tags extends AbstractApi
{
    /**
     * Get all tags for a repository.
     *
     * @param string $username
     * @param string $repository
     * @param array  $params     the additional parameters like milestone, assignees, labels, sort, direction
     *
     * @return array
     */
    public function all($username, $repository, array $params = [])
    {
        return $this->get('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/tags', $params);
    }

    /**
     * Get a tag for a repository.
     *
     * @param string $username
     * @param string $repository
     * @param string $sha
     *
     * @return array
     */
    public function show($username, $repository, $sha)
    {
        return $this->get('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/tags/'.rawurlencode($sha));
    }

    /**
     * Create a tag for a repository.
     *
     * @param string $username
     * @param string $repository
     * @param array  $params
     *
     * @return array
     *
     * @throws \Github\Exception\MissingArgumentException
     */
    public function create($username, $repository, array $params)
    {
        if (!isset($params['tag'], $params['message'], $params['object'], $params['type'])) {
            throw new MissingArgumentException(array('tag', 'message', 'object', 'type'));
        }

        if (!isset($params['tagger'])) {
            throw new MissingArgumentException('tagger');
        }

        if (!isset($params['tagger']['name'], $params['tagger']['email'], $params['tagger']['date'])) {
            throw new MissingArgumentException(array('tagger.name', 'tagger.email', 'tagger.date'));
        }

        return $this->post('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/tags', $params);
    }
}

{'fraction_non_alphanumeric': 0.1685449536689206, 'fraction_numerical': 0.0005008765339343851, 'mean_word_length': 2.7502347417840376, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2623346', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1136, 'n_words': 246}