Skip to content

Phoenix app to handle slash commands from Slack

License

Notifications You must be signed in to change notification settings

wthmichelle/Slax-Test

 
 

Repository files navigation

TravisCI Build Status Coverage Status License: MIT

Slax

A Phoenix app that supports the following slash commands from Slack:

Install

git clone https://github.com/revelrylabs/slax
./bin/setup
./bin/server

Configuration

The /bin/setup script should add a config/dev.secret.exs file. Use this to put secrets into. /rel/config/prod_runtime_config.exs is a good example of what secrets are needed as that file is used to setup secrets in produciton.

You will need to create a GitHub OAuth app in order to use the GitHub functionality, including authentication.

Create Github OAuth App

config :slax, Slax.Github,
  api_url: "https://api.github.com",
  oauth_url: "https://github.com/login/oauth",
  client_id: "<my_client_id>",
  client_secret: "<my_client_secret>",
  org_name: "<my_org_name>",
  org_teams: ["<my_org_team>"]

Usage / Commands

All commands provide usage details when executing them without any parameters.

/auth

This command will authenticate the Slack user with different services so that actions performed will be attributed to that user. This currently supports the following services:

  • Github

Example: /auth github

/issue

Create an issue on any Github repository that the authenticated user has access to. If the user is not authenticated, he or she will be directed to use /auth github to authenticate. If a new line is present in the message, everything after it will be considered part of the body. After creating the issue it will give you a link to it.

Usage: /issue <org/repo> <title> [\nbody]

Example: /issue revelrylabs/slax New Issue!

/project

new

Creates a new repo in github, runs reusable stories, sets up webhooks, and creates slack channel if it doesn't exist.

Usage: /project new <project_name>

Example: /project new taco

Creates repo in the default organization

add-reusable-stories

runs reusable stories in the given repo

Usage: /project add-reusable-stories <repo>

Example: /project add-reusable-stories taco

Looks for repo in the default organization

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/revelrylabs/slax. Check out CONTRIBUTING.md for more info.

Everyone is welcome to participate in the project. We expect contributors to adhere the Contributor Covenant Code of Conduct (see CODE_OF_CONDUCT.md).

About

Phoenix app to handle slash commands from Slack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 78.5%
  • JavaScript 19.7%
  • Shell 1.1%
  • Dockerfile 0.7%