Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit c6cdf6c

Browse files
committed
Align with template code
1 parent e63051c commit c6cdf6c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

server.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require 'sinatra'
22
require 'octokit'
33
require 'dotenv/load' # Manages environment variables
4-
require 'git'
54
require 'json'
65
require 'openssl' # Verifies the webhook signature
76
require 'jwt' # Authenticates a GitHub App
@@ -63,6 +62,7 @@ class GHAapp < Sinatra::Application
6362
# ADD YOUR CODE HERE #
6463
# # # # # # # # # # # #
6564

65+
200 # success status
6666
end
6767

6868

@@ -142,5 +142,11 @@ def verify_webhook_signature
142142
end
143143

144144
end
145+
146+
# Finally some logic to let us run this server directly from the commandline, or with Rack
147+
# Don't worry too much about this code. But, for the curious:
148+
# $0 is the executed file
149+
# __FILE__ is the current file
150+
# If they are the same—that is, we are running this file directly, call the Sinatra run method
145151
run! if __FILE__ == $0
146152
end

0 commit comments

Comments
 (0)