Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor GitLab webhook script section for clarity and formatting#447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hasit merged 4 commits intomainfromhasit/gitlab-webhook-script
Jul 15, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletionsdocs/self-hosted/gitlab.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,19 +37,25 @@ 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
- 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 a project or all projects under a group 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 \
Expand Down
4 changes: 2 additions & 2 deletionsstatic/code/gitlab-webhook.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,13 +7,13 @@
# Make sure the script is executable:
# chmod +x gitlab-webhook.sh

# PATexample (headerauto-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

# PATexample (explicit header)
# PATwithexplicit header
# ./gitlab-add-webhook.sh \
# -h "gitlab.example.com" -u "https://ci.example.com/gitlab-hook" \
# -s "mySecret" -g "mygroup/mysubgroup/myproject" \
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp