Skip to content

Commit

Permalink
stateless
Browse files Browse the repository at this point in the history
  • Loading branch information
mastashake08 committed Mar 12, 2023
1 parent 82ece45 commit c3909bd
Show file tree
Hide file tree
Showing 17 changed files with 341 additions and 52 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added app/.DS_Store
Binary file not shown.
28 changes: 28 additions & 0 deletions app/Jobs/HandlePullRequestWebhookJob.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace App\Jobs\GitHubWebhooks;

use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Spatie\GitHubWebhooks\Models\GitHubWebhookCall;

class HandlePullRequestWebhookJob implements ShouldQueue
{
use InteractsWithQueue, Queueable, SerializesModels;

public GitHubWebhookCall $gitHubWebhookCall;

public function __construct(
public GitHubWebhookCall $webhookCall
) {}

public function handle()
{
// do your work here

// you can access the payload of the webhook call with `$this->webhookCall->payload`
$data = $this->webhookCall->payload;
}
}
2 changes: 2 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
use Laravel\Jetstream\HasTeams;
use Laravel\Sanctum\HasApiTokens;
use Laravel\Cashier\Billable;
use Mastashake\LaravelOpenaiApi\Traits\HasPrompts;
class User extends Authenticatable implements MustVerifyEmail
{
use Billable;
use HasApiTokens;
use HasFactory;
use HasProfilePhoto;
use HasPrompts;
use HasTeams;
use Notifiable;
use TwoFactorAuthenticatable;
Expand Down
Binary file added bootstrap/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"laravel/tinker": "^2.8",
"mastashake08/laravel-openai-api": "^1.2",
"openai-php/laravel": "^0.3.1",
"spatie/laravel-github-webhooks": "^1.2",
"tightenco/ziggy": "^1.0"
},
"require-dev": {
Expand Down
Loading

0 comments on commit c3909bd

Please sign in to comment.