You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 8, 2023. It is now read-only.
This is the sample project built by following the "[Building Your First GitHub App](https://developer.github.com/apps/building-your-first-github-app)" Quickstart guide on developer.github.com.
1
+
This is an example GitHub App that adds a label to all new issues opened in a repository. You can follow the "[Building your first GitHub App](https://developer.github.com/apps/quickstart-guide/building-your-first-github-app)" Quickstart guide on developer.github.com to learn how to build the app code in `server.rb`.
2
2
3
-
It consists of two different servers: `server.rb` (boilerplate) and `advanced_server.rb` (completed project).
3
+
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:
4
+
*`template_server.rb` (GitHub App template code)
5
+
*`server.rb` (completed project)
4
6
5
-
## Install and run
7
+
To learn how to set up a template GitHub App, follow the "[Configuring a GitHub App](https://developer.github.com/apps/quickstart-guide/configuring-ast-github-app)" Quickstart guide on developer.github.com.
8
+
9
+
## Install
6
10
7
11
To run the code, make sure you have [Bundler](http://gembundler.com/) installed; then enter `bundle install` on the command line.
8
12
9
-
* For the boilerplate project, enter `ruby server.rb` on the command line.
13
+
## Set environment variables
14
+
15
+
1. Create a copy of the `.env-example` file called `.env`.
16
+
2. Add your GitHub App's private key, app ID, and webhook secret to the `.env` file.
10
17
11
-
* For the completed project, enter `ruby advanced_server.rb` on the command line.
18
+
## Run the server
12
19
13
-
Both commands will run the server at `localhost:3000`.
20
+
1. Run `ruby template_server.rb` or `ruby server.rb` on the command line.
21
+
1. View the default Sinatra app at `localhost:3000`.
0 commit comments