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
Copy file name to clipboardExpand all lines: README.md
+24-4
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,24 @@
1
-
# Sample GitHub App
1
+
# Rudder GitHub App
2
2
3
-
This sample app showcases how webhooks can be used with a GitHub App's installation token to create a bot that responds to issues. Code uses [octokit.js](https://github.com/octokit/octokit.js).
3
+
A Node.js server for GitHub app to assist external contributors and save maintainers' time
4
+
5
+
## Roadmap
6
+
7
+
-[x] When an external contributor (not the internal team) raises a PR, post a comment to sign CLA and label PR `Pending CLA``
8
+
-[x] On signing CLA, remove `Pending CLA`` label and never ask that user to sign the CLA again on any of our repo in future [DONE]
9
+
-[x] On `rudder-transformer`` PR merge, post a comment to raise PR in `integrations-config`
10
+
-[ ] On `integrations-config`` PR merge, psot a comment to join Slack's product-releases channel to get notified when that integration goes live
4
11
5
12
## Requirements
6
13
7
14
- Node.js 20 or higher
8
15
- A GitHub App subscribed to **Pull Request** events and with the following permissions:
9
16
- Pull requests: Read & write
10
17
- Metadata: Read-only
11
-
- (For local development) A tunnel to expose your local server to the internet (e.g. [smee](https://smee.io/), [ngrok](https://ngrok.com/) or [cloudflared](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/))
12
18
- Your GitHub App Webhook must be configured to receive events at a URL that is accessible from the internet.
19
+
- (Only for local development) A tunnel to expose your local server to the internet (e.g. [smee](https://smee.io/), [ngrok](https://ngrok.com/) or [cloudflared](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/))
13
20
14
-
## Setup
21
+
## Development setup
15
22
16
23
1. Clone this repository.
17
24
2. Create a `.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.
@@ -21,6 +28,19 @@ This sample app showcases how webhooks can be used with a GitHub App's installat
21
28
- If you're using `smee`, run `smee -u <smee_url> -t http://localhost:3000/api/webhook`.
22
29
6. Ensure your GitHub App includes at least one repository on its installations.
23
30
31
+
## Deployment
32
+
33
+
### Using `Docker`
34
+
35
+
1.[Register a GitHub app](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app) for your GitHub organization. Make sure to activate the webhook with webhook url `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.
36
+
2. Install your GitHub app in all the repos where you need this app.
37
+
3. Clone this repo
38
+
4. Update `docker-compose.yml` environment variables with the details received from the step 2
39
+
> 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`
40
+
5. Run `docker-componse build` to build the service
41
+
6. Run `docker-compose up` to create and start the container
42
+
7. Test by visiting `http://localhost:3000`
43
+
24
44
## Usage
25
45
26
46
With your server running, you can now create a pull request on any repository that
0 commit comments