Git Product home page Git Product logo

stf-bot's Introduction

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

2. Install confirmation

3. Install target apk file to all devices managed by your openstf/stf ๐ŸŽ‰

Setup

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

  1. Create Slack App 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:

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

Then, you can start this bot server:

$ 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 to publicize your local bot application for debug)

References

stf-bot's People

Contributors

ainoya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stf-bot's Issues

Got error on first run

Hi There,

Really appreciate for your works with this slack bot, but i found problem when running it

ubuntu@ip:~/stf-bot$ node main.js
url.js:555
    throw new TypeError('Parameter "urlObj" must be an object, not ' +
    ^

TypeError: Parameter "urlObj" must be an object, not undefined
    at urlFormat (url.js:555:11)
    at new Request (/home/ubuntu/stf-bot/node_modules/superagent/lib/node/index.js:128:37)
    at request (/home/ubuntu/stf-bot/node_modules/superagent/lib/request.js:29:10)
    at Function.request.(anonymous function) [as get] (/home/ubuntu/stf-bot/node_modules/superagent/lib/node/index.js:1030:15)
    at SuperagentHttpClient.execute (/home/ubuntu/stf-bot/node_modules/swagger-client/lib/http.js:204:26)
    at module.exports.SwaggerHttp.execute (/home/ubuntu/stf-bot/node_modules/swagger-client/lib/http.js:83:10)
    at module.exports.SwaggerClient.build (/home/ubuntu/stf-bot/node_modules/swagger-client/lib/client.js:226:23)
    at module.exports.SwaggerClient.initialize (/home/ubuntu/stf-bot/node_modules/swagger-client/lib/client.js:151:17)
    at new module.exports (/home/ubuntu/stf-bot/node_modules/swagger-client/lib/client.js:104:17)
    at Object.<anonymous> (/home/ubuntu/stf-bot/main.js:19:14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.