lib/GitHub/Receiver/Issues/Milestones.php
public function createMilestone(string $title, string $state = AbstractApi::STATE_OPEN, string $description = '',
                                    string $dueOn = ''): array
    {
        return $this->getApi()->request($this->getApi()
                                             ->sprintf('/repos/:owner/:repo/milestones', $this->getIssues()->getOwner(),
                                                 $this->getIssues()->getRepo()), Request::METHOD_POST, [
                'title'       => $title,
                'state'       => $state,
                'description' => $description,
                'due_on'      => (new DateTime($dueOn))->format(DateTime::ATOM)
            ]);
    }
public function createMilestone(string $title, string $state = AbstractApi::STATE_OPEN, string $description = '',
                                    string $dueOn = ''): array
    {
        return $this->getApi()->request($this->getApi()
                                             ->sprintf('/repos/:owner/:repo/milestones', $this->getIssues()->getOwner(),
                                                 $this->getIssues()->getRepo()), Request::METHOD_POST, [
                'title'       => $title,
                'state'       => $state,
                'description' => $description,
                'due_on'      => (new DateTime($dueOn))->format(DateTime::ATOM)
            ]);
    }
public function createMilestone ( string $ title , string $ state = AbstractApi :: STATE_OPEN , string $ description = '' , string $ dueOn = '' ) : array { return $ this -> getApi ( ) -> request ( $ this -> getApi ( ) -> sprintf ( '/repos/:owner/:repo/milestones' , $ this -> getIssues ( ) -> getOwner ( ) , $ this -> getIssues ( ) -> getRepo ( ) ) , Request :: METHOD_POST , [ 'title' => $ title , 'state' => $ state , 'description' => $ description , 'due_on' => ( new DateTime ( $ dueOn ) ) -> format ( DateTime :: ATOM ) ] ) ; }
Create a milestone

@link https://developer.github.com/v3/issues/milestones/#create-a-milestone

@param string $title
@param string $state
@param string $description
@param string $dueOn

@return array
Create a milestone