PHP Class REBELinBLUE\Deployer\Http\Controllers\WebhookController

Inheritance: extends Controller
ファイルを表示 Open project: rebelinblue/deployer

Public Methods

Method Description
__construct ( REBELinBLUE\Deployer\Contracts\Repositories\ProjectRepositoryInterface $projectRepository, REBELinBLUE\Deployer\Contracts\Repositories\DeploymentRepositoryInterface $deploymentRepository ) WebhookController constructor.
refresh ( integer $project_id ) : Illuminate\View\View Generates a new webhook URL.
webhook ( Illuminate\Http\Request $request, string $hash ) : Illuminate\View\View Handles incoming requests to trigger deploy.

Private Methods

Method Description
appendProjectSettings ( array $payload, Illuminate\Http\Request $request, Project $project ) : array | false Takes the data returned from the webhook request and then adds deployers own data, such as project ID and runs any checks such as checks the branch is allowed to be deployed.
parseWebhookRequest ( Illuminate\Http\Request $request, Project $project ) : array | false Goes through the various webhook integrations as checks if the request is for them and parses it.

Method Details

__construct() public method

WebhookController constructor.
public __construct ( REBELinBLUE\Deployer\Contracts\Repositories\ProjectRepositoryInterface $projectRepository, REBELinBLUE\Deployer\Contracts\Repositories\DeploymentRepositoryInterface $deploymentRepository )
$projectRepository REBELinBLUE\Deployer\Contracts\Repositories\ProjectRepositoryInterface
$deploymentRepository REBELinBLUE\Deployer\Contracts\Repositories\DeploymentRepositoryInterface

refresh() public method

Generates a new webhook URL.
public refresh ( integer $project_id ) : Illuminate\View\View
$project_id integer
return Illuminate\View\View

webhook() public method

Handles incoming requests to trigger deploy.
public webhook ( Illuminate\Http\Request $request, string $hash ) : Illuminate\View\View
$request Illuminate\Http\Request
$hash string The webhook hash
return Illuminate\View\View