From 5202a9166d033c6e6e6681ec3e28945d24b1cc96 Mon Sep 17 00:00:00 2001 From: Hasit Mistry Date: Mon, 14 Jul 2025 17:07:19 -0700 Subject: [PATCH 1/4] Refactor GitLab webhook script section for clarity and formatting --- docs/self-hosted/gitlab.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/self-hosted/gitlab.md b/docs/self-hosted/gitlab.md index 2488cfa0..03bcf565 100644 --- a/docs/self-hosted/gitlab.md +++ b/docs/self-hosted/gitlab.md @@ -44,12 +44,18 @@ Consult official CodeRabbitAI documentation for a detailed [guide](https://docs. - Issues events - Merge request events -We have a convenient [script](/code/gitlab-webhook.sh) to help you add webhooks to all projects in a GitLab instance. You can run it with the following command: +## Add Webhook Using a Script + +We have a convenient [script](/code/gitlab-webhook.sh) to help you add webhooks to all projects in a GitLab instance. ```bash # Make sure the script is executable: chmod +x gitlab-webhook.sh +``` +Example usage: + +```bash # PAT example (header auto-detected) export GITLAB_TOKEN="glpat-xxxxx" ./gitlab-add-webhook.sh \ From c4564cf00e805c8e5ae5fe04a29d2ce67e6cfaae Mon Sep 17 00:00:00 2001 From: Hasit Mistry Date: Mon, 14 Jul 2025 17:23:55 -0700 Subject: [PATCH 2/4] Clarify comments in gitlab-webhook.sh regarding PAT usage examples --- static/code/gitlab-webhook.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/code/gitlab-webhook.sh b/static/code/gitlab-webhook.sh index b217079e..1458ba0d 100644 --- a/static/code/gitlab-webhook.sh +++ b/static/code/gitlab-webhook.sh @@ -7,13 +7,13 @@ # Make sure the script is executable: # chmod +x gitlab-webhook.sh -# PAT example (header auto-detected) +# PAT auto-detected header # export GITLAB_TOKEN="glpat-xxxxx" # ./gitlab-add-webhook.sh \ # -h "gitlab.example.com" -u "https://ci.example.com/gitlab-hook" \ # -s "mySecret" -p 42 -# PAT example (explicit header) +# PAT with explicit header # ./gitlab-add-webhook.sh \ # -h "gitlab.example.com" -u "https://ci.example.com/gitlab-hook" \ # -s "mySecret" -g "mygroup/mysubgroup/myproject" \ From c81d20bfc751d001f3b4b97ef06dd91439efcd9c Mon Sep 17 00:00:00 2001 From: Hasit Mistry Date: Mon, 14 Jul 2025 17:24:40 -0700 Subject: [PATCH 3/4] Clarify description of the webhook script usage in GitLab documentation --- docs/self-hosted/gitlab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/self-hosted/gitlab.md b/docs/self-hosted/gitlab.md index 03bcf565..b1d579f4 100644 --- a/docs/self-hosted/gitlab.md +++ b/docs/self-hosted/gitlab.md @@ -46,7 +46,7 @@ Consult official CodeRabbitAI documentation for a detailed [guide](https://docs. ## Add Webhook Using a Script -We have a convenient [script](/code/gitlab-webhook.sh) to help you add webhooks to all projects in a GitLab instance. +We have a convenient [script](/code/gitlab-webhook.sh) to help you add webhooks to a project or all projects under a group in a GitLab instance. ```bash # Make sure the script is executable: From 6da4a880ba894e236d13e405e16353aabab5dc96 Mon Sep 17 00:00:00 2001 From: Hasit Mistry Date: Mon, 14 Jul 2025 17:25:33 -0700 Subject: [PATCH 4/4] Fix formatting for selecting triggers in GitLab webhook documentation --- docs/self-hosted/gitlab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/self-hosted/gitlab.md b/docs/self-hosted/gitlab.md index b1d579f4..395d93fc 100644 --- a/docs/self-hosted/gitlab.md +++ b/docs/self-hosted/gitlab.md @@ -37,7 +37,7 @@ Consult official CodeRabbitAI documentation for a detailed [guide](https://docs. 1. **Navigate to Add Webhook Page**: Go to the webhook configuration page in the desired GitLab project. 2. **Add Webhook URL**: Enter the URL pointing to the CodeRabbit service, followed by `/gitlab_webhooks` (e.g., `http://127.0.0.1:8080/gitlab_webhooks`). 3. **Generate and Save Secret Token**: Generate a secret token, add it to the webhook, and store it securely. This will be needed for the `.env` file as `GITLAB_WEBHOOK_SECRET` (you can use a single secret token for all projects). -4. Select triggers: +4. **Select triggers**: - Push events - Comments pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy