Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-helldar committed Mar 21, 2024
2 parents 90e6478 + 862406e commit a8994bf
Show file tree
Hide file tree
Showing 25 changed files with 956 additions and 203 deletions.
804 changes: 795 additions & 9 deletions .editorconfig

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
-
package-ecosystem: github-actions
directory: /
schedule:
interval: daily
4 changes: 1 addition & 3 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace App\Http\Controllers;

abstract class Controller
{
}
abstract class Controller {}
2 changes: 1 addition & 1 deletion app/Http/Middleware/GitHubMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class GitHubMiddleware
{
protected const ALGO = 'sha256';
protected const ALGO = 'sha256';
protected const AUTH_HEADER = 'X-Hub-Signature-256';
protected const PING_HEADER = 'X-GitHub-Event';

Expand Down
10 changes: 5 additions & 5 deletions app/Http/Requests/PullRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ public function rules(): array
'release.name' => ['required', 'string', 'doesnt_start_with:.'],
'release.body' => ['required', 'string'],

'release.draft' => ['required', 'bool', 'declined'],
'release.draft' => ['required', 'bool', 'declined'],
'release.prerelease' => ['required', 'bool', 'declined'],

'release.html_url' => ['required', 'url'],

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

'repository.visibility' => ['required', 'string', Rule::enum(VisibilityEnum::class)],

'repository.private' => ['required', 'boo', 'declined'],
'repository.archived' => ['required', 'boo', 'declined'],
'repository.disabled' => ['required', 'boo', 'declined'],
'repository.private' => ['required', 'boo', 'declined'],
'repository.archived' => ['required', 'boo', 'declined'],
'repository.disabled' => ['required', 'boo', 'declined'],
'repository.is_template' => ['required', 'boo', 'declined'],
];
}
Expand Down
2 changes: 1 addition & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
'password' => 'hashed',
];
}
}
9 changes: 4 additions & 5 deletions app/Services/Telegram.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@ class Telegram
public function __construct(
protected string $token,
protected array $chatIds
) {
}
) {}

public function publish(ReleaseData $data): void
{
foreach ($this->chatIds as $chatId) {
$this->send((int)$chatId, $this->message($data));
$this->send((int) $chatId, $this->message($data));
}
}

protected function send(int $chatId, string $content): void
{
Http::acceptJson()->post($this->url('sendMessage'), [
'chat_id' => $chatId,
'text' => $content,
'chat_id' => $chatId,
'text' => $content,
'parse_mode' => 'HTML',
]);
}
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@
},
"config": {
"allow-plugins": {
"dragon-code/codestyler": true,
"ergebnis/composer-normalize": true,
"pestphp/pest-plugin": true,
"php-http/discovery": true
"php-http/discovery": true,
"symfony/thanks": true
},
"optimize-autoloader": true,
"preferred-install": "dist",
Expand Down
6 changes: 2 additions & 4 deletions config/app.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Application Name
Expand Down Expand Up @@ -39,7 +38,7 @@
|
*/

'debug' => (bool)env('APP_DEBUG', false),
'debug' => (bool) env('APP_DEBUG', false),

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -116,7 +115,6 @@

'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],

];
12 changes: 5 additions & 7 deletions config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use App\Models\User;

return [

/*
|--------------------------------------------------------------------------
| Authentication Defaults
Expand All @@ -16,7 +15,7 @@
*/

'defaults' => [
'guard' => env('AUTH_GUARD', 'web'),
'guard' => env('AUTH_GUARD', 'web'),
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
],

Expand All @@ -39,7 +38,7 @@

'guards' => [
'web' => [
'driver' => 'session',
'driver' => 'session',
'provider' => 'users',
],
],
Expand All @@ -64,7 +63,7 @@
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => User::class,
'model' => User::class,
],
],

Expand All @@ -90,8 +89,8 @@
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_reset_tokens',
'expire' => 60,
'table' => 'password_reset_tokens',
'expire' => 60,
'throttle' => 60,
],
],
Expand All @@ -108,5 +107,4 @@
*/

'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),

];
10 changes: 3 additions & 7 deletions config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use Illuminate\Support\Str;

return [

/*
|--------------------------------------------------------------------------
| Default Cache Store
Expand Down Expand Up @@ -32,18 +31,16 @@
*/

'stores' => [

'array' => [
'driver' => 'array',
'driver' => 'array',
'serialize' => false,
],

'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'lock_path' => storage_path('framework/cache/data'),
],

],

/*
Expand All @@ -58,5 +55,4 @@
*/

'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache_'),

];
58 changes: 26 additions & 32 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use Illuminate\Support\Str;

return [

/*
|--------------------------------------------------------------------------
| Default Database Connection Name
Expand All @@ -30,35 +29,33 @@
*/

'connections' => [

'sqlite' => [
'driver' => 'sqlite',
'url' => env('DB_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'driver' => 'sqlite',
'url' => env('DB_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],

'mysql' => [
'driver' => 'mysql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'driver' => 'mysql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],

],

/*
Expand All @@ -73,7 +70,7 @@
*/

'migrations' => [
'table' => 'migrations',
'table' => 'migrations',
'update_date_on_publish' => true,
],

Expand All @@ -89,32 +86,29 @@
*/

'redis' => [

'client' => env('REDIS_CLIENT', 'phpredis'),

'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
],

'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],

'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],

],

];
32 changes: 14 additions & 18 deletions config/filesystems.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
Expand Down Expand Up @@ -29,33 +28,31 @@
*/

'disks' => [

'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
'root' => storage_path('app'),
'throw' => false,
],

'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL') . '/storage',
'visibility' => 'public',
'throw' => false,
'throw' => false,
],

's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
'throw' => false,
],

],

/*
Expand All @@ -72,5 +69,4 @@
'links' => [
public_path('storage') => storage_path('app/public'),
],

];
Loading

0 comments on commit a8994bf

Please sign in to comment.