Skip to content

Majordomo allows you to easily integrate your project with slack, github, (eventually) email.

Notifications You must be signed in to change notification settings

khemritolya/majordomo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Majordomo

Majordomo allows you to easily integrate your project with slack, github, (eventually) email, and (potentially) more.

Majordomo does this by allowing you to create handlers, which are bits of code that run when Majordomo receives certain events, including HTTP Post Requests and Slack Messages. Inside your handlers, you can use one liners to send slack messages, create github issues, and more!

Using Majordomo

  1. Think about some action you want to automate.

    For example, say you wanted an endpoint to forward whatever is sent to it to slack. Consider the handler we would write in this situtation:

    fn handle(v) {
       slack_post("majordomo-testing-channel", v);
       v
    }
  2. Obtain an API Key (for now talk to @khemritolya )

  3. Create your handler by POST-ing to the endpoint

    curl -X POST https://[addr]/upsert_handler -d "{\"uri\":\"example\", \"code\":\"fn handle(v) { slack_post("majordomo-testing-channel", v); v } \", \"api_key\":\"[your api key]\"}"
  4. Make calls to the handler in your project!

    curl -X POST https://[addr]/h/example -d "Hello World" 

    This now posts "Hello World" to "#majordomo-testing-channel" on slack. It will also respond with the json {"status":true,"data":"Hello World"}. If there had been any errors along the way, the status becomes false, and data contains a helpful error message!

About

Majordomo allows you to easily integrate your project with slack, github, (eventually) email.

Resources

Stars

Watchers

Forks

Releases

No releases published