A Node.js server for GitHub app to assist external contributors and save maintainers' time
Pending CLA
Pending CLA
label from all the PRs of that user. Never ask that user to sign the CLA on any of our repo in futurerudder-transformer
PR merge, post a comment to raise PR in integrations-config
integrations-config
PR merge, psot a comment to join Slack's product-releases channel to get notified when that integration goes liveintegrations-config
PR merge, post a comment to raise PR in rudder-docs
.env
file similar to .env.example
and set actual values. If you are using GitHub Enterprise Server, also include a ENTERPRISE_HOSTNAME
variable and set the value to the name of your GitHub Enterprise Server instance.npm install
.npm run server
.smee
, run smee -u <smee_url> -t http://localhost:3000/api/webhook
.Docker
https://YOUR_WEBSITE/api/webhook
in your app with a secret. Enable Permissions & Events as you may need, at minimum pull_request and issue related events should be enabled.build/docker-compose.yml
to install via dockerhub imagedocker-compose.yml
environment variables with the details received from the step 2
To convert GitHub App's private key to base64, use this command -
openssl base64 -in /path/to/original-private-key.pem -out ./base64EncodedKey.txt -A
docker-componse build
to build the servicedocker-compose up
to create and start the containerhttp://localhost:3000
OR whatever WEBSITE_ADDRESS
environment variable you've configuredWith your server running, you can now create a pull request on any repository that
your app can access. GitHub will emit a pull_request.opened
event and will deliver
the corresponding Webhook payload to your server.
The server in this example listens for pull_request.opened
events and acts on
them by creating a comment on the pull request, with the message in message.md
,
using the octokit.js rest methods.
To keep things simple, this example reads the GITHUB_APP_PRIVATE_KEY
from the
environment. A more secure and recommended approach is to use a secrets management system
like Vault, or one offered
by major cloud providers:
Azure Key Vault,
AWS Secrets Manager,
Google Secret Manager,
etc.