Skip to content

Commit f1ea8be

Browse files
Review comments are incorporated
1 parent b2f48c4 commit f1ea8be

File tree

1 file changed

+21
-75
lines changed

1 file changed

+21
-75
lines changed

src/content/docs/service-architecture-intelligence/github-integrations/github-enterprise-integration.mdx

Lines changed: 21 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ In your GHE instance, navigate to **Settings → Developer Settings → GitHub A
4848

4949
Configure app permissions accurately to ensure seamless data fetching during the initial sync and efficient listening to webhook events thereafter. App permissions define the scope of access that the application has to various repository and organizational resources on GitHub. By tailoring these permissions, you can enhance security, ensuring that the application only accesses the necessary data while minimizing exposure. Proper configuration facilitates smooth initial data synchronization and reliable event handling, optimizing the application's integration with GitHub's ecosystem.
5050

51-
For detailed guidance on GitHub App permissions, refer to the [GitHub documentation on setting permissions for GitHub Apps](https://docs.github.com/en/apps/creating-github-apps/setting-up-a-github-app/setting-permissions-for-github-apps).
51+
For detailed guidance on GitHub App permissions, refer to the [GitHub documentation on setting permissions for GitHub Apps](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/choosing-permissions-for-a-github-app).
5252

5353
#### Required repository permissions
5454

@@ -64,59 +64,19 @@ Configure the following repository-level permissions exactly as shown to enable
6464
* **Pull requests**: Selected ✓
6565
* **Webhooks**: Read-only ✓
6666

67-
**Leave these permissions as "No access":**
68-
* Actions
69-
* Attestations
70-
* Code scanning alerts
71-
* Codespaces
72-
* Codespaces lifecycle admin
73-
* Codespaces metadata
74-
* Codespaces secrets
75-
* Dependabot alerts
76-
* Dependabot secrets
77-
* Discussions
78-
* Environments
79-
* Issues
80-
* Merge queues
81-
* Packages
82-
* Pages
83-
* Projects
84-
* Repository security advisories
85-
* Secret scanning alert dismissal requests
86-
* Secret scanning alerts
87-
* Secret scanning push protection bypass requests
88-
* Secrets
89-
* Single file
90-
* Variables
91-
* Workflows
9267

9368
#### Required organization permissions
9469

9570
Configure the following organization-level permissions exactly as shown:
9671

9772
* **Administration**: Read-only ✓
98-
* **Custom organization roles**: Selected ✓
99-
* **Custom properties**: Selected ✓
100-
* **Custom repository roles**: Selected ✓
101-
* **Events**: Selected ✓
102-
* **Members**: Selected ✓
103-
* **Webhooks**: Selected ✓
104-
105-
**Leave these permissions as "No access":**
106-
* Blocking users
107-
* Organization announcement banners
108-
* Organization codespaces
109-
* Organization codespaces secrets
110-
* Organization codespaces settings
111-
* Organization dependabot secrets
112-
* Organization hooks
113-
* Organization packages
114-
* Organization plan
115-
* Organization projects
116-
* Organization secrets
117-
* Organization self hosted runners
118-
* Plan
119-
* Team discussions
73+
* **Custom organization roles**: Read-only ✓
74+
* **Custom properties**: Read-only ✓
75+
* **Custom repository roles**: Read-only ✓
76+
* **Events**: Read-only ✓
77+
* **Members**: Read-only ✓
78+
* **Webhooks**: Read-only ✓
79+
12080

12181
#### Webhook event subscriptions
12282

@@ -130,7 +90,12 @@ Select the following webhook events exactly as shown for real-time synchronizati
13090
* `deployment` - Deployment activities
13191
* `deployment_review` - Deployment review processes
13292
* `deployment_status` - Deployment status updates
93+
* `discussion` - Discussion activities
94+
* `discussion_comment` - Comments on discussions
95+
* `installation` - GitHub App installation events
96+
* `installation_repositories` - Repository access changes for installations
13397
* `installation_target` - GitHub App installation changes
98+
* `issue_comment` - Comments on issues
13499
* `member` - Member profile changes
135100
* `membership` - Member additions and removals
136101
* `organization` - Organization-level changes
@@ -142,26 +107,6 @@ Select the following webhook events exactly as shown for real-time synchronizati
142107
* `team` - Team creation and modifications
143108
* `team_add` - Team member additions
144109

145-
**Leave these events unselected:**
146-
* `branch_protection_configuration`
147-
* `check_run`
148-
* `fork`
149-
* `gollum`
150-
* `issues`
151-
* `label`
152-
* `merge_queue_entry`
153-
* `meta`
154-
* `milestone`
155-
* `public`
156-
* `release`
157-
* `repository_dispatch`
158-
* `repository_ruleset`
159-
* `security_and_analysis`
160-
* `star`
161-
* `status`
162-
* `watch`
163-
* `workflow_dispatch`
164-
* `workflow_job`
165110

166111
<Callout variant="tip">
167112
**Security best practice**: Only enable the minimum permissions required for your integration needs. This reduces security exposure and follows the principle of least privilege access.
@@ -172,17 +117,17 @@ Select the following webhook events exactly as shown for real-time synchronizati
172117
Configure the Webhook URL and create a custom Event Secret for secure communication:
173118

174119
* **Webhook URL**: Use the following format based on your collector service deployment:
175-
* For HTTP: `http://your-collector-host:8080/webhook`
176-
* For HTTPS: `https://your-collector-host:8443/webhook`
120+
* For HTTP: `http://your-domain-name/github/sync/webhook`
121+
* For HTTPS: `https://your-domain-name/github/sync/webhook`
177122

178123
**Example**: If your collector service is deployed at `collector.yourcompany.com`, the webhook URL would be:
179-
`https://collector.yourcompany.com:8443/webhook`
124+
`https://collector.yourcompany.com/github/sync/webhook`
180125

181126
* **Event Secret**: Generate a secure random string (32+ characters) for webhook authentication. Save this value as you'll need it for the `GITHUB_APP_WEBHOOK_SECRET` environment variable.
182127

183128
### Generate and convert keys
184129

185-
1. Upon creation, the app will generate a unique App ID and a Private Key file (.pem format). Save these securely as they will be needed for the collector service configuration.
130+
1. Upon creation, the app will generate a unique App ID and a Private Key file (.pem format). Save these securely as they will be needed for the collector service configuration. Note that the customer needs to create a private key for the app, which will be generated automatically during this process.
186131

187132
2. Convert your downloaded private key file to DER format and then encode it in Base64:
188133

@@ -207,7 +152,7 @@ Configure the Webhook URL and create a custom Event Secret for secure communicat
207152
Copy the resulting Base64 string and use it as the value for `GITHUB_APP_PRIVATE_KEY` environment variable in your collector configuration.
208153

209154
**✓ Success indicators:**
210-
* GitHub App shows "Installed" status in your GitHub Enterprise instance
155+
* Github app is created successfully
211156
* App ID and private key are securely saved
212157
* Webhook URL is configured and accessible
213158

@@ -388,7 +333,7 @@ Never commit environment files containing secrets to version control. Use secure
388333

389334
### Option B: Direct Docker image run
390335

391-
You can download the Docker image directly from our [Docker Hub registry](https://hub.docker.com/repository/docker/newrelic/nr-ghe-collector/general) and run it using your organization's preferred CI/CD pipeline or deployment method.
336+
You can download the Docker image directly from our [Docker Hub registry](https://hub.docker.com/repository/docker/newrelic/nr-ghe-collector/general) and run it using your organization's preferred CI/CD pipeline or deployment method. Note that the customer needs to pass all the environment variables listed above while starting the collector service.
392337

393338
**✓ Success indicators:**
394339
* Collector service is running and accessible on the configured port
@@ -432,6 +377,8 @@ Once the collector service is running and the GitHub App is installed on your GH
432377

433378
4. After you view the Sync started message, click **Continue**. The **GitHub Enterprise Integration** screen displays the count of teams and repositories, refreshing every 5 seconds. Allow 15-30 minutes for the complete import of all data (timing depends on repository count).
434379

380+
{/* TODO: Add screenshot of the New Relic Dashboard UI showing the GitHub Enterprise Integration screen */}
381+
435382
### Viewing your data
436383

437384
On the **GitHub Enterprise integration** screen:
@@ -464,7 +411,6 @@ For more information on creating custom properties, refer to the [GitHub documen
464411
**Webhook delivery failures:**
465412
* Verify the collector service is running and accessible from GitHub Enterprise
466413
* Check firewall settings and network connectivity
467-
* Confirm webhook URL uses the correct port (8080 for HTTP, 8443 for HTTPS)
468414

469415
**Authentication errors:**
470416
* Verify the GitHub App ID and private key are correctly configured

0 commit comments

Comments
 (0)