On this page
Comment Settings
This page explains how to control the volume and behavior of Pull/Merge Request comments that Pipelines-as-Code generates for PipelineRun status updates.
For GitHub (Webhook), GitLab, and Gitea/Forgejo integrations, you can control which
Pull/Merge Request comments Pipelines-as-Code posts by using
the spec.settings.<provider>.comment_strategy setting. This is useful for reducing notification
volume in repositories that use long-lasting Pull/Merge Requests with many PipelineRuns.
The spec.settings.<provider>.comment_strategy field accepts ""
(default), "update", and "disable_all".
Setting comment_strategy to update creates a single comment for
each PipelineRun. When the status changes or the PipelineRun is re-executed,
Pipelines-as-Code updates the same comment with the new status and the associated commit SHA.
Setting comment_strategy to disable_all prevents Pipelines-as-Code
from posting any comment on the Pull/Merge Request related to
PipelineRun status.
update and disable_all strategy applies only to
comments about a PipelineRun’s status (e.g., “started,” “succeeded”).
Pipelines-as-Code may still post comments if there are errors validating PipelineRuns in
the .tekton/ directory. (See Running the PipelineRun docs for details.)GitLab
By default, Pipelines-as-Code attempts to update the commit status through the GitLab API. It first tries the source project (fork), then falls back to the target project (upstream repository). The source project update succeeds when the configured token has access to the source repository and GitLab creates pipeline entries for external CI systems like Pipelines-as-Code.
The target project fallback may fail if there is no CI pipeline running for that commit in the target repository, because GitLab only creates pipeline entries for commits that actually trigger CI in that specific project. If either status update succeeds, Pipelines-as-Code does not post a comment on the Merge Request.
flowchart LR
%% title: How the GitLab commit status falls back to a Merge Request comment, depending on comment_strategy
%% autoplay
Ctrl@{ img: "/icons/controller.svg", label: "Controller", w: 48, h: 48, constraint: "on" }
Src@{ img: "/icons/fork.svg", label: "Source project status", w: 48, h: 48, constraint: "on" }
Tgt@{ img: "/icons/repository.svg", label: "Target project status", w: 48, h: 48, constraint: "on" }
Str[comment_strategy]
New@{ img: "/icons/comment.svg", label: "New comment", w: 48, h: 48, constraint: "on" }
Upd@{ img: "/icons/rerun.svg", label: "Updated comment", w: 48, h: 48, constraint: "on" }
None@{ img: "/icons/stop.svg", label: "No comment", w: 48, h: 48, constraint: "on" }
Ctrl --> Src
Src -->|fails| Tgt
Tgt -->|fails| Str
Str -->|default| New
Str -->|update| Upd
Str -->|disable_all| None
%% play: Status on the fork
%% Ctrl -> Src : status | The token can write to the source project, so the status lands there and no comment is posted
%% play: Status upstream
%% Ctrl -> Src : status
%% Src -> Tgt : fails | Without access to the fork, the status goes to the target project
%% play: Default
%% Ctrl -> Src : status
%% Src -> Tgt : fails
%% Tgt -> Str : fails | Both status updates failed, so the result is reported as a comment
%% Str -> New : default | Each status change adds a new comment on the Merge Request
%% play: update
%% Ctrl -> Src : status
%% Src -> Tgt : fails
%% Tgt -> Str : fails
%% Str -> Upd : update | One comment per PipelineRun is edited with the new status and commit SHA
%% play: disable_all
%% Ctrl -> Src : status
%% Src -> Tgt : fails
%% Tgt -> Str : fails
%% Str -> None : disable_all | Nothing is posted on the Merge RequestSuccessful commit status reporting is also important for the /retest command.
When PipelineRuns are pruned from the cluster, Pipelines-as-Code queries
GitLab’s commit status API to identify which pipelines previously succeeded,
ensuring only failed pipelines are re-run. If commit statuses were never
reported (for example, because both status updates failed and only a comment was
posted), Pipelines-as-Code cannot determine prior results and will fail to
re-run any pipelines when /retest unless you retest individual PipelineRuns
with /test <pipeline-name>.
When a status update succeeds, you can see the status in the GitLab UI in the Pipelines tab, as
shown in the following example:

Pipelines-as-Code posts comments only when:
- Both commit status updates fail (typically due to insufficient token permissions)
- The event type and repository settings allow commenting
- The
comment_strategyis not set todisable_all
spec:
settings:
gitlab:
comment_strategy: "disable_all"For installation guidance and troubleshooting fork-based workflows, see: GitLab Installation - Working with Forked Repositories
GitHub Webhook
spec:
settings:
github:
comment_strategy: "disable_all"Forgejo/Gitea
You can also configure a custom User-Agent header for API requests to
Forgejo/Gitea instances. This is useful when your instance is behind an AI
scraping protection proxy (such as Anubis) that
blocks requests without a recognized User-Agent.
By default, Pipelines-as-Code sends pipelines-as-code/<version> as the
User-Agent. You can override this per repository:
spec:
settings:
forgejo:
user_agent: "my-custom-agent"