public function delete(string $ref): bool
    {
        $this->getApi()->request($this->getApi()
                                      ->sprintf('/repos/:owner/:repo/git/refs/:ref', $this->getGitData()->getOwner(),
                                          $this->getGitData()->getRepo(), $ref), Request::METHOD_DELETE);

        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
            return true;
        }

        return false;
    }