Skip to content

Commit 3c5f6f4

Browse files
mintlify[bot]almeidabbmjpetey75
authored
chore: add github app instructions (#40)
* Documentation edits made through Mintlify web editor * chore: add checks * chore: add github app instructions --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: almeidabbm <[email protected]> Co-authored-by: Jake Peterson <[email protected]>
1 parent 460a24c commit 3c5f6f4

8 files changed

+81
-15
lines changed

images/github-create-app.png

36.9 KB
Loading

images/github-deactivate-webhooks.png

29.5 KB
Loading
19.4 KB
Loading
26.9 KB
Loading

images/github-oauth-refresh-token.png

57.9 KB
Loading

self-host/customize-deployment/configure-a-slack-app-for-lightdash.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: "Configure a slack integration for self-hosted Lightdash"
2+
title: "Configure a Slack integration for self-hosted Lightdash"
33
sidebarTitle: Slack Integration
44
---
55

66
In this guide we will show you how you can enable [the Slack integration](/references/slack-integration) on your on self-hosted Lightdash server.
77

8-
### Create a new Slack APP on your organization
8+
### Create a new Slack app on your organization
99

1010
First we will have to create a Slack APP [https://api.slack.com/apps?new\_app=1](https://api.slack.com/apps?new%5Fapp=1)
1111

@@ -23,7 +23,7 @@ Then select the workspace you want to enable this into. Later you can `enable di
2323
</Frame>
2424

2525

26-
Then copy this manifest to allow URL unfurls in your app. **Make sure you update `your Lightdash URL` in the manifest below** (for example, `app.lightdash.cloud` or `eu1.lightdash.cloud`).
26+
Then copy this manifest to allow URL unfurls in your app. **Make sure you update `your-lightdash-deployment-url.com` in the manifest below** (for example, `app.lightdash.cloud`).
2727

2828
```json
2929
display_information:
@@ -76,9 +76,10 @@ Now copy the following credentials from your new app.
7676
From `Basic Information`
7777

7878
<Frame>
79-
<img src="" alt=""/>
80-
</Frame>
8179
![](/images/slack-basic-information-9a846bde79778d77d0c2616734fac8f1.png)
80+
</Frame>
81+
82+
8283
* Client ID
8384
* Client secret (show and copy)
8485
* Signing secret (show and copy)
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: "Configure Github integration for self-hosted Lightdash"
3+
description: "Description of your new file."
4+
---
5+
6+
In this guide we will show you how you can enable the Github integration on your on self-hosted Lightdash server.
7+
8+
### Create a new Github app
9+
10+
Go to app settings in Github, either organization or account developer settings and click `New Github App`
11+
12+
![Github Create App Pn](/images/github-create-app.png)
13+
14+
**Settings:**
15+
16+
1. Set the app name: must be unique across Github
17+
2. Add a description
18+
3. Homepage URL: e.g. `https://lightdash.com`
19+
4. Callback URL: `https://<your-domain>/api/v1/github/oauth/callback`
20+
5. Enable `Expire user authorization tokens`
21+
6. Enable `Request user authorization (OAuth) during installation`
22+
23+
![Github Oauth Refresh Token Pn](/images/github-oauth-refresh-token.png)
24+
7. Deactivate webhooks
25+
26+
![Github Deactivate Webhooks Pn](/images/github-deactivate-webhooks.png)
27+
28+
**Repository Permissions:**
29+
30+
- Checks: `Read and write`
31+
- Contents: `Read and write`
32+
- Pull requests: `Read and write`
33+
- Workflows (optional): `Read and write`
34+
35+
**Account Permissions: **None
36+
37+
**Where can this GitHub App be installed? **Any account
38+
39+
### **Generate Certificate and Secret**
40+
41+
After creating your Github account you will need to generate a Client Secret.
42+
43+
Copy it and keep it safe, this will get used for the `GITHUB_CLIENT_SECRET` environment variable.
44+
45+
![Github Generate Client Secret Pn](/images/github-generate-client-secret.png)
46+
47+
And a Private Key.
48+
49+
Convert the contents of the private key file into `base64` , this will get used for the `GITHUB_PRIVATE_KEY` environment variable.
50+
51+
![Github Generate Private Key Pn](/images/github-generate-private-key.png)
52+
53+
<Info>
54+
You should save both the Client Secret and the Private Key in a safe place as you might need them at a later time.
55+
</Info>
56+
57+
### Adding credentials to your local environment
58+
59+
Now you need to add the following environment variables to your Lightdash server.
60+
61+
- `GITHUB_PRIVATE_KEY` : This is the `base64` string of the Private Key generated for your Github app
62+
- `GITHUB_CLIENT_SECRET` : This is the client secret generated for your Github app
63+
- `GITHUB_CLIENT_ID`: Copy this from your Github app settings \> General
64+
- `GITHUB_APP_ID`: Copy this from your Github app settings \> General
65+
- `GITHUB_APP_NAME`: This is the name you set for your app, you can find it in app settings.

self-host/customize-deployment/environment-variables.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ These variables enable you to configure the [AI Analyst functionality](guides/ai
162162

163163
### Slack Integration
164164

165-
These variables enable you to configure the [Slack integration](guides/using-slack-integration.mdx).
165+
These variables enable you to configure the [Slack integration](/guides/using-slack-integration).
166166

167167
| Variable | Description | Required? | Default |
168168
| :--------------------- | :----------------------------- | :-------: | :-----: |
@@ -173,16 +173,16 @@ These variables enable you to configure the [Slack integration](guides/using-sla
173173

174174
### GitHub Integration
175175

176-
These variables enable you to configure Github integrations
176+
These variables enable you to configure [Github integrations](/self-host/customize-deployment/configure-github-for-lightdash)
177177

178-
| Variable | Description | Required? | Default |
179-
| :----------------------- | :----------------------------------------------- | :-------: | :-----: |
180-
| `GITHUB_PRIVATE_KEY` | GitHub private key for GitHub App authentication | | |
181-
| `GITHUB_APP_ID` | GitHub Application ID | | |
182-
| `GITHUB_CLIENT_ID` | GitHub OAuth client ID | | |
183-
| `GITHUB_CLIENT_SECRET` | GitHub OAuth client secret | | |
184-
| `GITHUB_APP_NAME` | Name of the GitHub App | | |
185-
| `GITHUB_REDIRECT_DOMAIN` | Domain for GitHub OAuth redirection | | |
178+
| Variable | Description | Required? | Default |
179+
| :----------------------- | :----------------------------------------------- | :------------------------------------------: | :-----: |
180+
| `GITHUB_PRIVATE_KEY` | GitHub private key for GitHub App authentication | <Icon icon="square-check" iconType="solid" />| |
181+
| `GITHUB_APP_ID` | GitHub Application ID | <Icon icon="square-check" iconType="solid" />| |
182+
| `GITHUB_CLIENT_ID` | GitHub OAuth client ID | <Icon icon="square-check" iconType="solid" />| |
183+
| `GITHUB_CLIENT_SECRET` | GitHub OAuth client secret | <Icon icon="square-check" iconType="solid" />| |
184+
| `GITHUB_APP_NAME` | Name of the GitHub App | <Icon icon="square-check" iconType="solid" />| |
185+
| `GITHUB_REDIRECT_DOMAIN` | Domain for GitHub OAuth redirection | | |
186186

187187
### **Organization appearance**
188188

0 commit comments

Comments
 (0)