private function resolveBranch($user, $repo, $branch)
    {
        $api = $this->client->api('git_data')->references();
        $params = [$user, $repo, sprintf('heads/%s', $branch)];

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