lib/GitHub/Receiver/Repositories/Deployments.php
public function createDeployement(string $ref, string $task = AbstractApi::TASK_DEPLOY, bool $autoMerge = true,
                                      array $requiredContexts = [], string $payload = '',
                                      string $environment = AbstractApi::ENVIRONMENT_PRODUCTION,
                                      string $description = ''): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/deployments',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST, [
                'ref'               => $ref,
                'task'              => $task,
                'auto_merge'        => $autoMerge,
                'required_contexts' => $requiredContexts,
                'payload'           => $payload,
                'environment'       => $environment,
                'description'       => $description
            ]);
    }
public function createDeployement(string $ref, string $task = AbstractApi::TASK_DEPLOY, bool $autoMerge = true,
                                      array $requiredContexts = [], string $payload = '',
                                      string $environment = AbstractApi::ENVIRONMENT_PRODUCTION,
                                      string $description = ''): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/deployments',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST, [
                'ref'               => $ref,
                'task'              => $task,
                'auto_merge'        => $autoMerge,
                'required_contexts' => $requiredContexts,
                'payload'           => $payload,
                'environment'       => $environment,
                'description'       => $description
            ]);
    }
public function createDeployement ( string $ ref , string $ task = AbstractApi :: TASK_DEPLOY , bool $ autoMerge = true , array $ requiredContexts = [ ] , string $ payload = '' , string $ environment = AbstractApi :: ENVIRONMENT_PRODUCTION , string $ description = '' ) : array { return $ this -> getApi ( ) -> request ( $ this -> getApi ( ) -> sprintf ( '/repos/:owner/:repo/deployments' , $ this -> getRepositories ( ) -> getOwner ( ) , $ this -> getRepositories ( ) -> getRepo ( ) ) , Request :: METHOD_POST , [ 'ref' => $ ref , 'task' => $ task , 'auto_merge' => $ autoMerge , 'required_contexts' => $ requiredContexts , 'payload' => $ payload , 'environment' => $ environment , 'description' => $ description ] ) ; }
Create a Deployment

@link https://developer.github.com/v3/repos/deployments/#create-a-deployment

@param string $ref
@param string $task
@param bool   $autoMerge
@param array  $requiredContexts
@param string $payload
@param string $environment
@param string $description

@return array
Create a Deployment