Skip to content

Commit aa91dd0

Browse files
committed
docs: Clarify documentation for repository comment_strategy
Add a more general "controlling comment volume" section with Github and Gitlab subsections to clarify the shared semantics
1 parent a8e6b9c commit aa91dd0

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

docs/content/docs/guide/repositorycrd.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,27 @@ right to merge commits to the default branch can change the PipelineRun and have
126126
access to the infrastructure.
127127
{{< /hint >}}
128128

129-
## Disabling all comments for PipelineRuns on GitLab MR
129+
## Controlling Pull/Merge Request comment volume
130+
131+
For GitHub (Webhook) and GitLab integrations, you can control the types
132+
of Pull/Merge request comments which Pipelines as Code emits using
133+
the `spec.<provider>.comment_strategy` setting. This can
134+
help reduce notification volume for Repositories which use long-lasting
135+
Pull/Merge requests with many PipelineRuns.
136+
137+
Acceptable values for `spec.<provider>.comment_strategy` are `""`
138+
(default) and `"disable_all"`.
139+
140+
When you set the value of `comment_strategy` to `disable_all` Pipelines
141+
as Code will not add any comment on the Pull/Merge Request related to
142+
PipelineRun status.
143+
144+
Note: The `disable_all` strategy applies only to comments about a
145+
PipelineRun's status (e.g., "started," "succeeded"). Comments may still
146+
appear if there are errors validating PipelineRuns in the `.tekton`
147+
directory. (See [Running the PipelineRun docs](../running/#errors-when-parsing-pipelinerun-yaml) for details)
148+
149+
### GitLab
130150

131151
By default, Pipelines-as-Code attempts to update the commit status through the
132152
GitLab API. It first tries the source project (fork), then falls back to the
@@ -149,8 +169,6 @@ Comments are only posted when:
149169
- The event type and repository settings allow commenting
150170
- The `comment_strategy` is not set to `disable_all`
151171

152-
To explicitly disable all comments on GitLab Merge Requests for a Repository,
153-
use the `comment_strategy` setting:
154172

155173
```yaml
156174
spec:
@@ -159,9 +177,7 @@ spec:
159177
comment_strategy: "disable_all"
160178
```
161179

162-
## Disabling all comments for PipelineRuns in GitHub Pull Requests on GitHub Webhook Setup
163-
164-
`comment_strategy` allows you to disable the comments on GitHub PR for a Repository
180+
### GitHub Webhook
165181

166182
```yaml
167183
spec:
@@ -170,11 +186,6 @@ spec:
170186
comment_strategy: "disable_all"
171187
```
172188

173-
When `comment_strategy` is set to `disable_all` Pipelines as Code will not create any comment on the pull request for PipelineRun Status
174-
175-
Note: The disable_all strategy applies only to comments about a PipelineRun's status (e.g., "started," "succeeded").
176-
If your PipelineRun YAML definition fails validation, a comment detailing the error will always be posted to the pull request. [see docs](../running/#errors-when-parsing-pipelinerun-yaml)
177-
178189
## Concurrency
179190

180191
`concurrency_limit` allows you to define the maximum number of PipelineRuns running at any time for a Repository.

0 commit comments

Comments
 (0)