Webhooks for Open edX, integrating JIRA and Github, designed to be deployed onto Heroku.
Don't worry, it's free for one dyno.
This project uses:
Generate a secret key for Flask, so that it can save information into the session:
$ export FLASK_SECRET_KEY=`python -c "import os; print(os.urandom(24))"`
$ heroku config:set FLASK_SECRET_KEY=$FLASK_SECRET_KEYOAuth authentication for JIRA requires a RSA keypair. To set this up:
- Run
openssl genrsa -out jira.pem. This will generate a private key. - Run
openssl rsa -in jira.pem -pubout -out jira.pub. This will generate the public key. - Generate a random string to serve as the consumer key. For example, run
python -c "import uuid; print(uuid.uuid4().hex)" > jira.uuid. - Configure an Application Link in JIRA. The consumer key is the contents
of
jira.uuid, and the public key is the contents ofjira.pub. - Set RSA key and consumer key in Heroku environment:
$ export JIRA_RSA_KEY="$(<jira.pem)" $ export JIRA_CONSUMER_KEY="$(<jira.uuid)" $ heroku config:set JIRA_RSA_KEY=$JIRA_RSA_KEY JIRA_CONSUMER_KEY=$JIRA_CONSUMER_KEY
- Register a new application on Github
- The new application will give you a consumer key and consumer secret. Set
these values in the Heroku environment:
$ heroku config:set GITHUB_CLIENT_ID=my-id GITHUB_CLIENT_SECRET=my-secret
- Set up your Heroku git remote to point to your Heroku application
git push heroku- Initialize the database by running
heroku run python manage.py dbcreate - Visit your website -- it should load!
- Visit
/login/jiraand authorize with JIRA - Visit
/login/githuband authorize with Github - Enjoy the sweet, sweet taste of API integration