PHP Class REBELinBLUE\Deployer\Http\Controllers\WebhookController

Inheritance: extends Controller
Afficher le fichier Open project: rebelinblue/deployer

Méthodes publiques

Méthode 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

Méthode 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 méthode

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 méthode

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

webhook() public méthode

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
Résultat Illuminate\View\View