This is the sample project that walks through creating a GitHub App and configuring a server to listen to installation
events. When an App is added to an account, it will create an issue in each repository with a message, "added new app!".
- Ruby installed
- Bundler installed
- ngrok or localtunnel exposing port
4567
to allow GitHub to access your server
- Set up and register GitHub App
- Enable
issue
write permissions - If not running on a public-facing IP, use ngrok to generate a URL as documented here
Install the required Ruby Gems by entering bundle install
on the command line.
Set environment variables GITHUB_APP_ID
and GITHUB_APP_PRIVATE_KEY
. For example, run the following to store the private key to an environment variable: export GITHUB_APP_PRIVATE_KEY="$(less private-key.pem)"
To start the server, type ruby server.rb
on the command line.
The sinatra server will be running at localhost:4567
.