- Notifications
You must be signed in to change notification settings - Fork134
github-developer/using-the-github-api-in-your-app
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is an example GitHub App that adds a label to all new issues opened in a repository. You can follow the archived "Using the GitHub API in your app" guide to learn how to build the app code inserver.rb
.
This project listens for webhook events and uses the Octokit.rb library to make REST API calls. This example project consists of two different servers:
template_server.rb
(GitHub App template code)server.rb
(completed project)
To learn how to set up a template GitHub App, follow the archived "Setting up your development environment" guide.
To run the code, make sure you haveBundler installed; then enterbundle install
on the command line.
- Create a copy of the
.env-example
file called.env
. - Add your GitHub App's private key, app ID, and webhook secret to the
.env
file.
- Run
ruby template_server.rb
orruby server.rb
on the command line. - View the default Sinatra app at
localhost:3000
.
About
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.