-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
197 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
WEBHOOK_PROXY_URL=https://smee.io/-------- | ||
# GitHub API endpoint | ||
API_BASE_URL="https://api.github.com" | ||
|
||
# | ||
# GitHub User's USERNAME | ||
# | ||
GH_USER="" | ||
|
||
# | ||
# GitHub User's PERSONAL ACCESS TOKEN which can be created here: | ||
# | ||
# https://github.com/settings/tokens/new?scopes=public_repo,read:user | ||
# | ||
GH_USER_TOKEN="" | ||
|
||
# | ||
# Once you've created a GITHUB APP here: | ||
# | ||
# https://github.com/settings/apps/new | ||
# | ||
# you'll see an "app id", "client id" and "client secret" at the top of the | ||
# settings page | ||
# | ||
# https://github.com/settings/apps/YOUR_APP_NAME#private-key | ||
# | ||
# for your app. Fill in those values below | ||
GH_APP_ID="" | ||
GH_APP_CLIENT_ID="" | ||
GH_APP_CLIENT_SECRET="" | ||
|
||
# | ||
# At the very bottom of your app's settings page | ||
# | ||
# https://github.com/settings/apps/YOUR_APP_NAME#private-key | ||
# | ||
# you'll find a "Private Keys"section, with a "Generate Private Key" button. | ||
# Clicking it will download a file to your computer. | ||
# | ||
# (1) Place that file in the `./private` folder so that it will be ignored by Git. | ||
# (2) Ensure that the GH_APP_PRIVATE_KEY_PATH variable leads to the relative path | ||
# of that file | ||
# | ||
# | ||
GH_APP_PRIVATE_KEY_PATH="./private/gh-app.key" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
test ! -f .env && \ | ||
echo "Could not find a .env file. You may want to run:" && \ | ||
echo "" && \ | ||
echo " cp .env.example .env" && \ | ||
echo "" && exit 1 | ||
|
||
# setup environment based on .env | ||
export $(egrep -v '^#' .env | xargs) | ||
|
||
# check for the presence of WEBHOOK_PROXY_URL | ||
eval val=\""\$WEBHOOK_PROXY_URL"\" | ||
if [[ -z "${val}" ]]; then | ||
echo "🛑 WEBHOOK_PROXY_URL has not been set. Please provide a value in your .env file" | ||
echo "" | ||
exit 1 | ||
else | ||
echo "✅ Starting webhook proxy w/ WEBHOOK_PROXY_URL=$WEBHOOK_PROXY_URL" | ||
echo "" | ||
fi | ||
|
||
# allow for the detection of the running webhook proxy | ||
export WEBHOOK_PROXY_IS_RUNNING=1 | ||
pysmee forward $WEBHOOK_PROXY_URL http://localhost:5000/webhook | ||
# indicate that the webhook proxy has been shut down | ||
unset WEBHOOK_PROXY_IS_RUNNING |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.