Skip to content

Commit 75a9067

Browse files
Remove Telegram integration and related configurations
1 parent ca6ad55 commit 75a9067

File tree

12 files changed

+23
-482
lines changed

12 files changed

+23
-482
lines changed

.env.example

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ APP_URL=http://localhost
77
TELESCOPE_ENABLED=false
88
SENTRY_LARAVEL_DSN=
99

10-
TELEGRAM_BOT_NAME=
11-
TELEGRAM_BOT_TOKEN=
12-
1310
GITHUB_WEBHOOK_TOKEN=
1411
GITHUB_TOKEN=
1512

app/Console/Commands/RegisterWebhooks.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

app/Http/Requests/ReleaseRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function rules(): array
2828
'release.html_url' => ['required', 'url'],
2929

3030
'repository.owner.login' => ['required', 'string'],
31-
'repository.name' => ['required', 'string', Rule::notIn(config('services.telegram.excludes'))],
31+
'repository.name' => ['required', 'string', Rule::notIn(config('services.boosty.excludes'))],
3232
'repository.full_name' => ['required', 'string', 'regex:/([\d\w\-_])+\/([\d\w\-_])+/'],
3333

3434
'repository.visibility' => ['required', 'string', 'in:public'],

app/Jobs/Telegram/ReleaseJob.php

Lines changed: 0 additions & 84 deletions
This file was deleted.

app/Services/Release.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,14 @@
66

77
use App\Data\ReleaseData;
88
use App\Jobs\Boosty\PublishJob;
9-
use App\Jobs\Telegram\ReleaseJob;
10-
use DefStudio\Telegraph\Models\TelegraphChat;
11-
use Illuminate\Database\Eloquent\Collection;
129

1310
class Release
1411
{
1512
public function publish(ReleaseData $data): void
1613
{
17-
$this->publishToTelegram($data);
1814
$this->publishToBoosty($data);
1915
}
2016

21-
protected function publishToTelegram(ReleaseData $data): void
22-
{
23-
$this->chats()->each(
24-
fn (TelegraphChat $chat) => ReleaseJob::dispatch(
25-
$chat->id,
26-
$data->repository,
27-
$data->version,
28-
$data->shortChangelog,
29-
$data->url
30-
)
31-
);
32-
}
33-
3417
protected function publishToBoosty(ReleaseData $data): void
3518
{
3619
PublishJob::dispatch(
@@ -40,9 +23,4 @@ protected function publishToBoosty(ReleaseData $data): void
4023
$data->url
4124
);
4225
}
43-
44-
protected function chats(): Collection
45-
{
46-
return TelegraphChat::get();
47-
}
4826
}

app/Webhooks/Telegram.php

Lines changed: 0 additions & 53 deletions
This file was deleted.

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"require": {
1212
"php": "^8.4",
1313
"ext-pdo": "*",
14-
"defstudio/telegraph": "^1.56.3",
1514
"dragon-code/laravel-deploy-operations": "^7.0",
1615
"dragon-code/laravel-json-response": "^3.0.1",
1716
"graham-campbell/github": "^13.0",

composer.lock

Lines changed: 1 addition & 95 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/services.php

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,19 @@
33
declare(strict_types=1);
44

55
return [
6-
'telegram' => [
7-
'token' => env('TELEGRAM_BOT_TOKEN'),
8-
'name' => env('TELEGRAM_BOT_NAME'),
9-
10-
'excludes' => [
11-
'.github',
12-
'docs',
13-
'status-generator',
14-
'webhooks-service',
15-
],
16-
17-
'max_errors' => 10,
18-
],
19-
206
'github' => [
217
'token' => env('GITHUB_WEBHOOK_TOKEN'),
228
],
239

2410
'boosty' => [
2511
'token' => env('BOOSTY_TOKEN'),
2612
'blog' => env('BOOSTY_BLOG'),
13+
14+
'excludes' => [
15+
'.github',
16+
'docs',
17+
'status-generator',
18+
'webhooks-service',
19+
],
2720
],
2821
];

0 commit comments

Comments
 (0)