lib/GitHub/Receiver/GitData/References.php
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;
    }
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;
    }
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 ; }
Delete a Reference

@link https://developer.github.com/v3/git/refs/#delete-a-reference

@param string $ref

@return bool
@throws \Exception
Delete a Reference