Giter Site home page Giter Site logo

botkit-my-slack's Introduction

Not finished. under heavy development

https://api.slack.com/docs/messages/builder

Botkit Starter Kit for Slack Bots

This repo contains everything you need to get started building a Slack bot with Botkit and Botkit Studio.

Botkit is designed to ease the process of designing and running useful, creative bots that live inside messaging platforms. Bots are applications that can send and receive messages, and in many cases, appear alongside their human counterparts as users.

Some bots talk like people, others silently work in the background, while others present interfaces much like modern mobile applications. Botkit gives developers the necessary tools for building bots of any kind! It provides an easy-to-understand interface for sending and receiving messages so that developers can focus on creating novel applications and experiences instead of dealing with API endpoints.

Our goal with Botkit is to make bot building easy, fun, and accessible to anyone with the desire to create a future filled with talking machines!

If you are looking to create a bot on other platforms using Glitch, check out the Botkit project page.

What's Included

  • Botkit core - a complete programming system for building conversational software
  • Botkit Studio API - additional APIs that extend Botkit with powerful tools and APIs
  • Pre-configured Express.js webserver including:
    • A customizable "Install my Bot" homepage
    • Login and oauth endpoints that allow teams to install your bot
    • Webhook endpoints for communicating with platforms
  • Sample skill modules that demonstrate various features of Botkit
  • A customizable onboarding experience for new teams powered by Botkit Studio

Getting Started

There are a myriad of methods you can use to set up an application on Slack, here are some of your options:

Use Botkit Studio

Botkit Studio is a set of tools that adds capabilities to the open source Botkit library by offering hosted GUI interfaces for script management and action trigger definition.

While Botkit Studio is not required to build a bot using Botkit, we highly recommend it as your bot will be easier to manage, customize and extend.

Install Botkit

Remix this project on Glitch

Deploy to Heroku

Clone this repository using Git:

git clone https://github.com/howdyai/botkit-starter-slack.git

Install dependencies, including Botkit:

cd botkit-starter-slack
npm install

Set up your Slack Application

Once you have setup your Botkit development enviroment, the next thing you will want to do is set up a new Slack application via the Slack developer portal. This is a multi-step process, but only takes a few minutes.

Next, get a Botkit Studio token from your Botkit developer account if you have decided to use Studio.

Update the .env file with your newly acquired tokens.

Launch your bot application by typing:

node .

Now, visit your new bot's login page: http://localhost:3000/login

Now comes the fun part of making your bot!

Extend This Starter kit

This starter kit is designed to provide developers a robust starting point for building a custom bot. Included in the code are a set of sample bot "skills" that illustrate various aspects of the Botkit SDK features. Once you are familiar with how Botkit works, you may safely delete all of the files in the skills/ subfolder.

Developers will build custom features as modules that live in the skills/ folder. The main bot application will automatically include any files placed there.

A skill module should be in the format:

module.exports = function(controller) {

    // add event handlers to controller
    // such as hears handlers that match triggers defined in code
    // or controller.studio.before, validate, and after which tie into triggers
    // defined in the Botkit Studio UI.

}

Continue your journey to becoming a champion botmaster by reading the Botkit Studio SDK documentation here.

Customize Storage

By default, the starter kit uses a simple file-system based storage mechanism to record information about the teams and users that interact with the bot. While this is fine for development, or use by a single team, most developers will want to customize the code to use a real database system.

There are Botkit plugins for all the major database systems which can be enabled with just a few lines of code.

We have enabled our Mongo middleware for starters in this project. To use your own Mongo database, just fill out MONGO_URI in your .env file with the appropriate information. For tips on reading and writing to storage, check out these medium posts

Developer & Support Community

You can find full documentation for Botkit on our GitHub page. Botkit Studio users can access the Botkit Studio Knowledge Base for help in managing their account.

Need more help?

  • Glitch allows users to ask the community for help directly from the editor! For more information on raising your hand, read this blog post.

  • Join our thriving community of Botkit developers and bot enthusiasts at large. Over 4500 members strong, our open Slack group is the place for people interested in the art and science of making bots.

Come to ask questions, share your progress, and commune with your peers!

Full video of our 2016 event is available on Youtube.

About Botkit

Botkit is a product of Howdy and made in Austin, TX with the help of a worldwide community of botheads.

What can it do?

it's a clone of bugbot

List of commands (just type help in the channel)

  • help : this list
  • add : add an issue
  • auth : login
  • issues : list of all issues
  • logout : logout from all
  • repo pick : pick a repository to work with
  • repos : list of all repositories
  • alias : list of all repositories
  • search : list of all repositories

ADMIN FUNCTIONS

not at this moment

  • flush : flush the current queue
  • setvolume number : sets volume
  • play : play track
  • stop : stop life
  • next : play next track
  • previous : play previous track

botkit-my-slack's People

Contributors

atherdon avatar dependabot-support avatar doppins-bot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

jsdelivrbot

botkit-my-slack's Issues

Repo pick Release 0

"Before Start you need to set a default repo"

In first run
1 "repos"
Reply Then run "repo pick number"

Reply Then you can 'list issues' or 'add issue'

if you need help about any of this command, run 'help'

Set default repository

  • Set default repo by "username/repo"

  • Set default by Alias #16

F:

  • Add ability to fetch names without adding whole typing name

Repo pick #2

  1. is this an alias? is this first, second default?

  2. if this a repository name

  3. check in settings array
    if match -> we get repository id or url => go to repo and fire next step

MAybe reply: "What you want to do with this repo?"
You can have this options: ....

  1. Don't have alias
    We search all repos, that user have

#45

PH widget

<script> window.productHuntUpcoming = { appId: 2338, position: 'bottomLeft', }; (function(doc, scr, src, a, b) { a = doc.createElement(scr); b = doc.getElementsByTagName(scr)[0]; a.async = true; a.src = src; b.parentNode.insertBefore(a, b); })(document, 'script', 'https://assets.producthunt.com/assets/upwigloader.js'); </script>

Release #0 Main

###Simple + Git Auth

  1. Login to Slack + Add bot
  2. Pick and set default repo
  3. list issues
  4. add issue (working with github)

Task add (Add issue) Release 0. Step 4

###Add issue

  • - Add task to array, title with description
  • - get all tasks from array
  • - remove task from array

assign task to default repo?

Repo pick
0) help
0) list issues
0) add issue

Docs

Earwig is a clone of popular slack bot BugBot(development is archived at this moment).
In another article, I'll give more details. Right now I want to share a document, that was created as a first explanation(my wishes) that I want to have in this bot.
The best thing that I plan to use it like a user, so I'll be able to do the thing, that will improve my life and it`s awesome.
It works with GitHub and Slack. For me, it's like a basic checklist of what must work.

What is the plan:

  • Finish the tutorial repo(how to build a bot), think what must be extended.

  • Extended in order to get out(online)

  • Astrobot is a good example how to create such kind of flow

  • I think I'll need to share, save slack token, GitHub token in another case how it will work

  • Close issue by commit?

  • Merge pull request?

  • Create a pull request? not sure

  • Maybe to open pull is ok feature

  • push commit to which branch

In place, where you can specify repo, specify branch also,
but maybe we need to have select with branches

  • I need more detailed data about GitHub API calls.

MAYBE IT"S A GOOD OPTION TO HAVE BASIC MODE AND ADVANCED MODE

  • Authorization
  • Login
  • Add slack command
  • Connect with GitHub
  • List GitHub issues

Flow:

  1. I find the bug
  2. whats the name?
  3. How can you describe it?
  • Setup project, add credentials

  • First calls initialization

  • Check Slack tic tac toe project about how did they style elements and render them inside message

  • When I commit -> check the titles with pre-hook

  • :todo parsing -> create issue on GitHub

  • title -> string body

  • notify on Slack -> create an issue from Slack

  • how to import an image from Slack? Need to figure it out.

  • Get information about repo

  • Grant permissions about adding something

Create commit + create pull request
Commit message
Create an issue
Add label
Add milestone
Add issue template

Note: Maybe it'll require creating some sort of account, repo, for saving personal settings or just another server with profile info
Note: It must be bound with Slack and GitHub login

  • Homepage? with FAQ, explanation of the process

  • create task list

  • Understand how to deploy, bot to production

  • Live server or it production ready

  • On last hackathon weeks all simple features must be solved in order to have time for bugfixes

  • Check dependencies

  • CI Travis with builds

  • Settings to show different types of notifications

  • Check commit message

  • Check todos

  • Task search

  • Fast reply?

  • Add comment

  • Assign task

Features for the latest releases. Can be not very interesting for other people, but I want to dig into this functionality.

Check dependencies updates
Check branch code for todo ==== cron?

Filter tasks by labels, by assignee
I'll need to have link to GitHub tasks or task so, for advanced stuff, we can change repository | save default repo |
fast access(select) to a few repositories, etc.

Thanks for your time and sorry for some not clear article.
Hope in future you'll be able to understand more.

Not important

Add assignee -> if we have assignee by default, by name

if we don't have assignee, return "Sorry, this user unnavailable for this repository"

gitbhu auth

  • auth
  • passport
  • repo data
  • repos
  • issues
  • add issue
  • add bugbot issues library

Not important

After moving to Mongodb -> ask all users to relogin

image upload

you can check stuff at sample middleware

controller.middleware.receive.use(function(bot, message, next) {
    
        // do something...
        console.log('RCVD:', message);
        next();
    
    });

Repos

Get Data
Display first reply with list of repos

sample_issues.js

Not important

IF we add 2 strings "stringA" "stringB", small will be title, long will be description

functionality

  • set default repo
  • set second repo
  • add alias to repo
  • search repos
  • add issue to default repo
  • add issue with repo search
  • fetch repos

Github Auth(Main)

  • Чистый продж в отдельной ветке

  • Получение информации об аккаунте

  • Сохр. информации об аккаунте

  • Сохр. в bugbot посмотреть

  • Get repositories( fetch repo)

  • вывод данных о repositories

  • Список issues from repo

  • Bind with display issues

  • logout

  • start first step-by-step

  • Search repos

  • Search issues

  • PassportJS strategy

  • npm iit express passport

  • add issue

  • label -> Fetch/Add

  • Upload image

  • Separate git functionality for API

  • And git functionality for bot only

  • and connect this 2 functions

ответить на вопрос: как сделать авторизацию после slack add bot

add issue #1

"add" "title is here"

  1. get title from matches array
  2. check default repo
  3. add issue to repo
    reply: "Your issue was added + link to github repo"

blank functions

BotConfiguration = () => {};

AddSetting = () => {};
DeleteSetting = () => {};
RevertSetting = () => {};
FinishInstall = () => {};

ViewIssueData = () => {};

FetchRepo = () => {};

getAllRepos = () => {};
getRepoData = () => {};
pickRepo = () => {};
setDefaultRepo = () => {};
listIssues = () => {};
AddIssue = () => {};
AliasAdd = () => {};
aliasEdit = () => {};
AliasDelete = () => {};

GithubLogout = () => {};
SlackLogout = () => {};
ListIssues = () => {};
isGithubConnected = () => {};
saveIssueToArray = () => {};
saveIssueToRepo = () => {};
getOnlyOpenIssues = () => {};
CountAllOpenIssues = () => {};

searchIssueByName = () => {};
searchIssueByNumber = () => {};
updateSetting = () => {};
addSetting = () => {};

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.