Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus more on triggering event which is the key thing #1548

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all 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
6 changes: 3 additions & 3 deletions docs/kb/semgrep-ci/mr-comments-through-gitlab-runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
append_help_link: true
title: Receive Semgrep MR comments through a GitLab runner
hide_title: true
description: Set additional environment variables to receive Semgrep MR comments through a GitLab runner.
description: Set additional environment variables to receive Semgrep MR comments with other pipeline events.
tags:
- Semgrep in CI
---

# Receive Semgrep MR comments through a GitLab runner
# Receive Semgrep MR comments with other pipeline events

Generally, Semgrep recommends using the [<i class="fas fa-external-link fa-xs"></i> GitLab merge request pipeline](https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html) to receive MR comments. This method is used in the default [Semgrep GitLab config file](/semgrep-ci/sample-ci-configs/#sample-github-actions-configuration-file).

However, you can also receive comments through your own [<i class="fas fa-external-link fa-xs"></i> GitLab runner](https://docs.gitlab.com/runner/) by setting the following variables in your CI job:
However, if you run pipelines on [other events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html), and want those pipelines to run [diff-aware scans](https://semgrep.dev/docs/semgrep-code/glossary#diff-aware-scan), you can configure them to do so and thereby receive comments by setting the following variables in your CI job:

<pre class="language-bash"><code>
export GITLAB_CI='true'
Expand Down
Loading