Skip to content

Commit

Permalink
Working on the readme file.
Browse files Browse the repository at this point in the history
  • Loading branch information
itorgov committed Mar 28, 2020
1 parent dbdefad commit f664c17
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 24 deletions.
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p align="center"><h1>Laravel Forge Telegram Bot</h1></p>
# Laravel Forge Telegram Bot

## About

It's unofficial Laravel Forge chat bot for Telegram messenger.
[@LaravelForgeBot](https://t.me/LaravelForgeBot) is unofficial Laravel Forge chat bot for Telegram messenger.

It helps you manage your servers in such operations as:

Expand All @@ -18,3 +18,33 @@ It's really helpful when you don't want to enable "Quick deploy" feature for you
Other awesome feature is sending deployment notifications from Laravel Forge to you or any other chat.
Using this abilyty only one member of your team will manage servers in his private chat with the bot, but all members will recieve deployment notifications in your team chat.

## How to use

List of available commands:

* /addtoken
* /deletetoken
* /menu
* /showchatid

You always can get an actual list of commands by using /help command.

### /addtoken

Use this command to add your [Laravel Forge API token](https://forge.laravel.com/user/profile#/api).
Note that you can add multiple tokens, so you can manage different Laravel Forge accounts from one place.
This command will trigger automaticaly after /start command.

### /deletetoken

If you want you can delete added token from the bot by using this command.

### /menu

This command creates a new menu for managing servers.

### /showchatid

Use this command to get an ID of any chat.
It will be helpful when you'll configure receiving deployment notifications to other chat.
Please note that if you have more than one bots in your target chat then you have to write bot's username after the command without space (/showchatid@LaravelForgeBot).
21 changes: 0 additions & 21 deletions tests/Feature/ExampleTest.php

This file was deleted.

22 changes: 22 additions & 0 deletions tests/Feature/SendDeploymentNotificationTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace Tests\Feature;

use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Queue;
use Tests\TestCase;

class SendDeploymentNotificationTest extends TestCase
{
use RefreshDatabase;

/** @test */
public function dispatch_job_when_hash_is_valid()
{
Queue::partialMock();

$response = $this->post(route('integrations.forge.webhook', ['hash' => '111']));

$response->assertStatus(404);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Illuminate\Support\Facades\Http;
use Tests\TestCase;

class IrazasyedTelegramBotApiTest extends TestCase
class IrazasyedTelegramBotTest extends TestCase
{
private function rawRequest(string $methodName, $data = []): Response
{
Expand Down

0 comments on commit f664c17

Please sign in to comment.