|
| 1 | +--- |
| 2 | +title: "GitHub App Setup for WaveMaker Enterprise (WME)" |
| 3 | +id: "github-app-setup" |
| 4 | +sidebar_label: "GitHub App Setup" |
| 5 | +--- |
| 6 | +--- |
| 7 | + |
| 8 | +**Author: Chakravarthy Batna** |
| 9 | + |
| 10 | +## Why Create a GitHub App? |
| 11 | + |
| 12 | +In WaveMaker Enterprise, users connect to GitHub by creating a **Code Repository** (a VCS account) in the Team Portal. While creating a Code Repository, the user can authenticate with either a **Personal Access Token (PAT)** or a **GitHub App**. |
| 13 | + |
| 14 | +Unlike WaveMaker Online — which comes with a ready-made, WaveMaker-managed GitHub App — WME is a **self-hosted deployment running in the customer's own environment**. There is no central GitHub App that the platform can ship with, because every WME installation runs under a different domain. The GitHub App's OAuth callback and post-installation URLs must point to that specific WME instance, which only the customer knows. |
| 15 | + |
| 16 | +So before users can pick **GitHub App** as the authentication method in the Team Portal, a WME administrator has to do a **one-time setup**: |
| 17 | + |
| 18 | +1. **Create a GitHub App** on [GitHub](https://github.com) under a personal account or organization, configured with the WME instance's callback URLs and the required permissions. |
| 19 | +2. **Register that GitHub App in WME LaunchPad** by providing the App ID, Client ID, Client Secret, and Private Key generated on GitHub. |
| 20 | + |
| 21 | +Once both steps are done, the registered GitHub App becomes available to **all existing and newly created teams** in the Team Portal, and any team can use it to create Code Repositories — without ever generating a PAT. |
| 22 | + |
| 23 | +The rest of this document walks through that one-time admin setup, and then how the GitHub App is used by end-users in the Team Portal. |
| 24 | + |
| 25 | +--- |
| 26 | + |
| 27 | +## How to Create a GitHub App |
| 28 | + |
| 29 | +Before connecting WME LaunchPad to GitHub, you need to create a GitHub App and collect the following credentials: |
| 30 | + |
| 31 | +| Field | Where to find it | |
| 32 | +|-------------------|---------------------------------------------| |
| 33 | +| **App ID** | GitHub App settings page (auto-generated) | |
| 34 | +| **Client ID** | GitHub App settings page (auto-generated) | |
| 35 | +| **Client Secret** | Generated once after app creation | |
| 36 | +| **Private Key** | Generated and downloaded after app creation | |
| 37 | + |
| 38 | +### Step 1 — Open the GitHub App Creation Page |
| 39 | + |
| 40 | +A GitHub App can be created either under your **personal user account** or under an **organization account**. Choose |
| 41 | +based on who will own and manage the app. |
| 42 | + |
| 43 | +#### Option A — Create under your Personal Account |
| 44 | + |
| 45 | +Use this if you want the app to be owned by your individual GitHub user account. |
| 46 | + |
| 47 | +> **Profile picture → Settings → Developer settings → GitHub Apps → New GitHub App** |
| 48 | +
|
| 49 | +#### Option B — Create under an Organization |
| 50 | + |
| 51 | +Use this if you want the app to be owned by a GitHub organization (recommended for teams and production deployments). |
| 52 | + |
| 53 | +> **Profile picture → Your organizations → Select your organization → Settings → Developer Settings → GitHub Apps → New |
| 54 | +GitHub App** |
| 55 | + |
| 56 | +### Step 2 — Fill in Basic Information |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +| Field | Value | |
| 61 | +|---------------------|---------------------------------------------------------------------| |
| 62 | +| **GitHub App name** | Choose a unique name (e.g., `WaveMaker-Studio-App`) | |
| 63 | +| **Description** | *(Optional)* A short description shown to users during installation | |
| 64 | +| **Homepage URL** | Your WME Studio base URL (e.g., `https://<your-wme-domain>`) | |
| 65 | + |
| 66 | +### Step 3 — Configure Callback URLs |
| 67 | + |
| 68 | +Callback URLs are where GitHub redirects users after they authorize your app via OAuth. WME requires **two** callback |
| 69 | +URLs. |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +Replace `<your-wme-domain>` with your actual WME Studio domain, then click **Add Callback URL** to add each one: |
| 74 | + |
| 75 | +**Callback URL 1:** |
| 76 | + |
| 77 | +``` |
| 78 | +https://<your-wme-domain>/edn-services/rest/github-apps/oauth/callback |
| 79 | +``` |
| 80 | + |
| 81 | +**Callback URL 2:** |
| 82 | + |
| 83 | +``` |
| 84 | +https://<your-wme-domain>/edn-services/rest/github-apps/oauth/default/callback |
| 85 | +``` |
| 86 | + |
| 87 | +Make sure **Expire user authorization tokens** is **checked** — this enables refresh tokens for long-lived sessions. |
| 88 | + |
| 89 | +### Step 4 — Configure Post Installation URL |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | +Under the **Post installation** section, set the **Setup URL** to: |
| 94 | + |
| 95 | +``` |
| 96 | +https://<your-wme-domain>/edn-services/rest/github-apps/installations/callback |
| 97 | +``` |
| 98 | + |
| 99 | +### Step 5 — Webhook |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | +**Uncheck the Active checkbox** under the Webhook section — WME does not require GitHub webhooks for the LaunchPad |
| 104 | +integration. |
| 105 | + |
| 106 | +### Step 6 — Set Repository Permissions |
| 107 | + |
| 108 | +This is the most important step. Under **Permissions → Repository permissions**, set: |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | +| Permission | Access Level | Why it's needed | |
| 113 | +|--------------------|--------------------|--------------------------------------------------------------------------------------------| |
| 114 | +| **Contents** | **Read and write** | Allows WME to read and write source code, commits, branches, releases, and perform merges | |
| 115 | +| **Pull requests** | **Read and write** | Allows WME to create and manage pull requests, comments, labels, and merges | |
| 116 | +| **Administration** | **Read and write** | Allows WME to create and manage repositories, configure settings, teams, and collaborators | |
| 117 | + |
| 118 | +> **Metadata** (Read-only) is automatically granted and mandatory for all GitHub Apps. |
| 119 | +
|
| 120 | +### Step 7 — Set Installation Scope |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | +At the bottom of the page, choose where this app can be installed: |
| 125 | + |
| 126 | +- **Only on this account** — Restricts the app to your personal account or organization only. Suitable for |
| 127 | + private/internal use. |
| 128 | +- **Any account** — Allows any GitHub user or organization to install this app. |
| 129 | + |
| 130 | +### Step 8 — Create the App |
| 131 | + |
| 132 | +Click the green **Create GitHub App** button. GitHub will redirect you to your new app's settings page. The **App ID** |
| 133 | +and **Client ID** are shown at the top — **save these values**. |
| 134 | + |
| 135 | +### Step 9 — Generate a Client Secret |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | +1. On the app settings page, scroll to the **Client secrets** section. |
| 140 | +2. Click **Generate a new client secret**. |
| 141 | +3. Copy the secret immediately — **GitHub will only show it once**. |
| 142 | +4. Store it securely (password manager or secrets vault). |
| 143 | + |
| 144 | +### Step 10 — Generate a Private Key |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | +1. Scroll down to the **Private keys** section. |
| 149 | +2. Click **Generate a private key**. |
| 150 | +3. A `.pem` file will be automatically downloaded. |
| 151 | +4. Keep this file secure — it cannot be retrieved again from GitHub. |
| 152 | + |
| 153 | +--- |
| 154 | + |
| 155 | +## Register Credentials in WME LaunchPad |
| 156 | + |
| 157 | +Once you have all four credentials, navigate to: |
| 158 | + |
| 159 | +> **LaunchPad → Identity Providers → GitHub Apps → Register GitHub App** |
| 160 | +
|
| 161 | +In the registration form, enter the four credentials you collected — **App ID**, **Client ID**, **Client Secret**, and **Private Key** — and save. |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | +After saving, the newly registered GitHub App appears in the **GitHub Apps** list in LaunchPad. From here, it becomes available to all existing teams and newly created teams for Code Repository creation. |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | +--- |
| 170 | + |
| 171 | +## Using the GitHub App in the Team Portal |
| 172 | + |
| 173 | +After the GitHub App is registered in LaunchPad, it becomes available to **all teams** in the Team Portal. Any team can now create a Code Repository using **GitHub App** as the authentication method — no further setup is required. |
| 174 | + |
| 175 | +The end-user flow (selecting GitHub App, authorizing, installing, choosing repositories, and updating an installation later) is identical to WaveMaker Online. Refer to: |
| 176 | + |
| 177 | +> **[GitHub App Integration in WaveMaker Platform](../../teams/github-app-integration.md)** — covers what a GitHub App is, how to create a Code Repository using GitHub App, and how to update an existing GitHub App installation from the Team Portal. |
0 commit comments