private function resolveTag($user, $repo, $reference)
    {
        if (!$tag = $this->parseRefAsTag($reference)) {
            return null;
        }

        $api = $this->client->api('git_data')->references();
        $params = [$user, $repo, sprintf('tags/%s', $tag)];

        $data = $this->callGitHub([$api, 'show'], $params);
        return $data['object']['sha'] ?? null;
    }