This commit is contained in:
Mark Gregory
2026-06-24 13:24:54 +01:00
parent 973f7a58d1
commit 758370ab1c
@@ -9,6 +9,7 @@ use Illuminate\Http\Request;
use Illuminate\Routing\Controller; use Illuminate\Routing\Controller;
use Illuminate\Support\Carbon; use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Modules\Helpdesk\Models\GitCommit;
final class GiteaWebhookController extends Controller final class GiteaWebhookController extends Controller
{ {
@@ -74,7 +75,7 @@ final class GiteaWebhookController extends Controller
'branch' => str_replace( 'branch' => str_replace(
'refs/heads/', 'refs/heads/',
'', '',
(string) data_get($payload, 'ref') (string) data_get($payload, 'ref'),
), ),
'author_name' => data_get($commit, 'author.name'), 'author_name' => data_get($commit, 'author.name'),
'author_email' => data_get($commit, 'author.email'), 'author_email' => data_get($commit, 'author.email'),
@@ -84,7 +85,7 @@ final class GiteaWebhookController extends Controller
? Carbon::parse(data_get($commit, 'timestamp')) ? Carbon::parse(data_get($commit, 'timestamp'))
: now(), : now(),
'payload' => $commit, 'payload' => $commit,
] ],
); );
Log::info('Git commit stored.', [ Log::info('Git commit stored.', [