An open API service indexing awesome lists of open source software.

https://github.com/ainoya/stf-bot

A Slack bot controlling openstf/stf devices
https://github.com/ainoya/stf-bot

bot openstf

Last synced: 11 months ago
JSON representation

A Slack bot controlling openstf/stf devices

Awesome Lists containing this project

README

          

A Slack bot controlling openstf/stf devices
============================================

## Features

- Install apk to all stf devices automatically when someone uploads apk to Slack

1\. Bot detects apk file uploaded

![](https://www.evernote.com/shard/s25/sh/54b7bc97-630d-4934-bc8f-2252183a9613/2a82aa801c8f3550/res/7327ce51-5cb3-4d60-98d8-f23f69e47db8/skitch.png)

2\. Install confirmation

![](https://www.evernote.com/shard/s25/sh/f37069e5-82a7-413c-90e7-b79c67273237/7aab4aeca39c6120/res/a4ff6831-a466-4b71-9253-24d40b415049/skitch.png)

3\. Install target apk file to all devices managed by your openstf/stf :tada:

![](https://www.evernote.com/shard/s25/sh/02ebeefa-2f04-4242-b2c4-4f8dba82e35a/b4837d46d91b16f1/res/dae96e66-3103-4edc-b6ee-cae357c1fd19/skitch.png)

## Setup

Before launching this bot, you have to setup Slack App to use Interactive Messages.

1. [Create Slack App](https://api.slack.com/apps/new) to create gateway to bot
2. Set `https://your-internet-reachable-host.com/slack/receive` to `Request URL` which locates in `Interactive Messages` section of App configuration
3. Set `https://your-internet-reachable-host/oauth` to `Redirect URI(s)` which locates in `OAuth Information` section of App configuration
4. Get OAuth `ClientID` and `Clien Secret` and copy them to `.envrc`
5. To allow bot seeing `file_created` events, add Event name `file_created` to `Event Subscriptions > Bot Events`

## How to use

Setup repository:

```sh
$ git clone https://github.com/ainoya/stf-bot
$ cd stf-bot
$ direnv allow
$ npm install
```

Then, you can start this bot server:

```sh
$ node main.js
```

After bot server is launched, you have to enable integration This Bot App via `https://your-internet-reachable-host/login`. If login is succeeded, you can see the bot is online in your Slack. (You can use [ngrok](https://ngrok.com/) to publicize your local bot application for debug)

## References

- [STF | Smartphone Test Farm](http://openstf.io/)
- https://github.com/openstf/adbkit
- https://github.com/howdyai/botkit
- https://github.com/henteko/slack_message_button_test