Skip to content

Commit cb1a78a

Browse files
Copilotocean90
andauthored
Add GitHub App setup instructions to docs/github.md (#283)
* Initial plan * Add GitHub App setup instructions to docs/github.md Agent-Logs-Url: https://github.com/wearerequired/traduttore/sessions/cef91595-cdc4-4a8f-8492-35b1662f8b6b Co-authored-by: ocean90 <617637+ocean90@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ocean90 <617637+ocean90@users.noreply.github.com>
1 parent 99709cd commit cb1a78a

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/github.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,22 @@ Now, every time you push changes to GitHub, Traduttore will get notified and the
3030
**Note:** The `TRADUTTORE_GITHUB_SYNC_SECRET` constant needs to be defined in your `wp-config.php` file to enable webhooks. Use the secret from step 5 for this.
3131

3232
Check out the [Configuration](configuration.md) section for a list of possible constants.
33+
34+
## GitHub App
35+
36+
As an alternative to configuring webhooks for each repository individually, you can create a GitHub App. This way the app automatically has access to all repositories (or the ones you select during installation), removing the need to set up webhooks per repository.
37+
38+
### Creating the App
39+
40+
1. Go to `https://github.com/organizations/<name>/settings/apps/new` (or `https://github.com/settings/apps/new` for a personal account).
41+
2. Enter a name and description for the app.
42+
3. In the **Webhook** section, check the "Active" checkbox.
43+
4. Set `https://<url-to-your-glotpress-site>.com/wp-json/traduttore/v1/incoming-webhook` as the webhook URL.
44+
5. Enter a webhook secret. Use the same value as the `TRADUTTORE_GITHUB_SYNC_SECRET` constant in your `wp-config.php`.
45+
6. In the **Repository permissions** section, set "Contents" to "Read-only".
46+
7. In the **Subscribe to events** section, check the "Push" checkbox.
47+
8. Under "Where can this GitHub App be installed?", choose "Only on this account" for a private app or "Any account" if you want others to install it.
48+
49+
### Installing the App
50+
51+
Once the app is created, install it on your account or organization. During installation you can grant access to all repositories or select specific ones. After installation, Traduttore will automatically receive push events for the configured repositories without any additional webhook setup.

0 commit comments

Comments
 (0)