feat: gitea manual webhooks

This commit is contained in:
Andras Bacsai
2024-05-23 11:30:18 +02:00
parent c3da3f11d9
commit 5475448af5
5 changed files with 270 additions and 0 deletions

View File

@@ -11,10 +11,12 @@ class Webhooks extends Component
public ?string $githubManualWebhook = null;
public ?string $gitlabManualWebhook = null;
public ?string $bitbucketManualWebhook = null;
public ?string $giteaManualWebhook = null;
protected $rules = [
'resource.manual_webhook_secret_github' => 'nullable|string',
'resource.manual_webhook_secret_gitlab' => 'nullable|string',
'resource.manual_webhook_secret_bitbucket' => 'nullable|string',
'resource.manual_webhook_secret_gitea' => 'nullable|string',
];
public function saveSecret()
{
@@ -32,6 +34,7 @@ class Webhooks extends Component
$this->githubManualWebhook = generateGitManualWebhook($this->resource, 'github');
$this->gitlabManualWebhook = generateGitManualWebhook($this->resource, 'gitlab');
$this->bitbucketManualWebhook = generateGitManualWebhook($this->resource, 'bitbucket');
$this->giteaManualWebhook = generateGitManualWebhook($this->resource, 'gitea');
}
public function render()
{