Skip to content

Commit

Permalink
Merge pull request #20 from Laravel-Lang/1.x
Browse files Browse the repository at this point in the history
Fixed alignment of PR elements
  • Loading branch information
andrey-helldar authored Mar 24, 2024
2 parents 2e1c765 + 40e37b0 commit 263228b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 33 deletions.
18 changes: 9 additions & 9 deletions app/Http/Requests/AssignRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ class AssignRequest extends FormRequest
public function rules(): array
{
return [
'action' => ['required', 'string', 'in:opened,edited'],
'action' => ['required', 'string', 'in:opened'],

'pull_request' => ['required', 'array'],
'pull_request.state' => ['required', 'string', 'in:open'],
'pull_request.locked' => ['required', 'bool', 'declined'],
'pull_request.draft' => ['required', 'bool', 'declined'],
'repository' => ['required', 'array'],
'repository.name' => ['required', 'string'],
'repository.owner.login' => ['required', 'string'],

'pull_request' => ['required', 'array'],
'pull_request.user.login' => ['required', 'string'],
'pull_request.number' => ['required', 'numeric'],
'pull_request.title' => ['required', 'string'],
'pull_request.user.login' => ['required', 'string'],

'repository' => ['required', 'array'],
'repository.name' => ['required', 'string'],
'repository.owner.login' => ['required', 'string'],
'pull_request.state' => ['required', 'string', 'in:open'],
'pull_request.locked' => ['required', 'bool', 'declined'],
'pull_request.draft' => ['required', 'bool', 'declined'],
];
}
}
15 changes: 8 additions & 7 deletions app/Http/Requests/DependabotRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@ public function rules(): array
return [
'action' => ['required', 'string', 'in:opened'],

'repository' => ['required', 'array'],
'repository.name' => ['required', 'string'],
'repository.owner.login' => ['required', 'string'],

'pull_request' => ['required', 'array'],
'pull_request.state' => ['required', 'string', 'in:open'],
'pull_request.number' => ['required', 'numeric'],

'pull_request.state' => ['required', 'string', 'in:open'],
'pull_request.locked' => ['required', 'bool', 'declined'],
'pull_request.draft' => ['required', 'bool', 'declined'],

'sender' => ['required', 'array'],
'sender.id' => ['required', 'numeric', Rule::in(config('github.dependabot.id'))],

'organization' => ['required', 'array'],
'organization.login' => ['required', 'string'],

'repository' => ['required', 'array'],
'repository.name' => ['required', 'string'],
];
}
}
23 changes: 10 additions & 13 deletions app/Http/Requests/TranslationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use App\Data\PullRequestData;
use App\Rules\InCollectionRule;
use Illuminate\Validation\Rule;
use Spatie\LaravelData\Data;

/** @method PullRequestData dto() */
Expand All @@ -19,22 +18,20 @@ public function rules(): array
return [
'action' => ['required', 'string', 'in:opened,edited,labeled'],

'repository' => ['required', 'array'],
'repository.name' => ['required', 'string'],
'repository.owner.login' => ['required', 'string'],

'pull_request' => ['required', 'array'],
'pull_request.state' => ['required', 'string', 'in:open'],
'pull_request.locked' => ['required', 'bool', 'declined'],
'pull_request.draft' => ['required', 'bool', 'declined'],
'pull_request.number' => ['required', 'numeric'],
'pull_request.head.sha' => ['required', 'string'],
'pull_request.labels' => ['required', 'array', new InCollectionRule('name', 'machine')],

'sender' => ['required', 'array'],
'sender.id' => ['required', 'numeric', Rule::in(config('github.actions.id'))],

'organization' => ['required', 'array'],
'organization.login' => ['required', 'string'],
'pull_request.title' => ['required', 'string'],
'pull_request.body' => ['required', 'string'],

'repository' => ['required', 'array'],
'repository.name' => ['required', 'string'],
'pull_request.state' => ['required', 'string', 'in:open'],
'pull_request.locked' => ['required', 'bool', 'declined'],
'pull_request.draft' => ['required', 'bool', 'declined'],
'pull_request.labels' => ['required', 'array', new InCollectionRule('name', 'machine')],
];
}
}
4 changes: 0 additions & 4 deletions config/github.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
'delay' => 5 * 60,
],

'actions' => [
'id' => 41898282,
],

'webhooks' => [
'github.assign' => ['pull_request'],
'github.dependabot' => ['pull_request'],
Expand Down

0 comments on commit 263228b

Please sign in to comment.