Skip to content

Comment Consolidation docs#3076

Merged
ZachGoldberg merged 4 commits intomainfrom
dev-1433
Apr 9, 2026
Merged

Comment Consolidation docs#3076
ZachGoldberg merged 4 commits intomainfrom
dev-1433

Conversation

@ZachGoldberg
Copy link
Copy Markdown
Contributor

@ZachGoldberg ZachGoldberg commented Apr 8, 2026

Summary by CodeRabbit

  • New Features

    • Added a repository-level status_update.new_comment_per_push option (default: true) to choose between creating a new PR/MR comment per push or updating a single comment in-place.
  • Documentation

    • Updated branch protection, PR/MR workflow, and API docs to describe the new option and platform differences: GitHub preserves comment edit history; GitLab does not.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 9, 2026 9:57pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 2026

Walkthrough

Added documentation for a new repository.status_update block (Pipelines v4.12.0) with an optional new_comment_per_push boolean (default true) that controls whether push-triggered plan results create a new comment per push or update a single comment in-place; noted provider-specific edit-history behavior for GitHub (preserves edits) and GitLab (does not preserve edits).

Changes

Cohort / File(s) Summary
Branch Protection / Workflow Docs
docs/2.0/docs/pipelines/installation/branch-protection.mdx, docs/2.0/docs/pipelines/installation/gitlab-branch-protection.md
Expanded pull request workflow text: push-triggered plan results are posted as comments by default (one new comment per push). Documented repository.status_update.new_comment_per_push = false to update a single comment in-place; noted GitHub preserves edit history while GitLab does not.
API Configuration Reference
docs/2.0/reference/pipelines/configurations-as-code/api.mdx
Added repository.status_update block (Pipelines v4.12.0) and optional new_comment_per_push boolean (default true) with behavior description and provider-specific notes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A tiny flag to guide the thread,
New notes or one kept instead;
GitHub saves the edits' art,
GitLab writes over from the start. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Comment Consolidation docs' directly reflects the main change—documentation updates for the new comment consolidation feature (status_update block with new_comment_per_push configuration).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-1433

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/2.0/reference/pipelines/configurations-as-code/api.mdx (1)

300-303: Use <Tabs>/<TabItem> for provider-specific behavior in this MDX section.

Line 302 presents meaningful GitHub vs GitLab differences inline; this should be split into tabs per docs convention.

Suggested MDX adjustment
 Controls whether Pipelines updates a single PR/MR comment in-place on each push instead of creating a new comment.
 
-- **`true`** — A single comment is updated on every push. On GitHub, the comment edit history preserves previous plan outputs. On GitLab, previous outputs are silently overwritten since GitLab does not have comment edit history.
+- **`true`** — A single comment is updated on every push.
+  <Tabs>
+  <TabItem value="github" label="GitHub" default>
+  The comment edit history preserves previous plan outputs.
+  </TabItem>
+  <TabItem value="gitlab" label="GitLab">
+  Previous outputs are silently overwritten because GitLab does not preserve comment edit history.
+  </TabItem>
+  </Tabs>
 - **`false`** (default) — A new comment is created for each push.

As per coding guidelines, "Whenever presenting information that diverges between GitHub and GitLab, use the and components to distinguish the two sets of information UNLESS the distinction is just changing one word."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/2.0/reference/pipelines/configurations-as-code/api.mdx` around lines 300
- 303, Split the provider-specific sentence about comment edit history into
provider tabs using the <Tabs> and <TabItem> MDX components: keep the main
description ("Controls whether Pipelines updates a single PR/MR comment...") and
then replace the inline GitHub/GitLab difference in the **`true`** bullet with
two tabbed panels—one <TabItem value="github"> explaining GitHub preserves
comment edit history and one <TabItem value="gitlab"> explaining GitLab silently
overwrites previous outputs—while leaving the **`false`** bullet unchanged; use
the <Tabs> wrapper to contain the two <TabItem> entries so the documentation
follows the provider-specific convention.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/2.0/reference/pipelines/configurations-as-code/api.mdx`:
- Around line 300-303: Split the provider-specific sentence about comment edit
history into provider tabs using the <Tabs> and <TabItem> MDX components: keep
the main description ("Controls whether Pipelines updates a single PR/MR
comment...") and then replace the inline GitHub/GitLab difference in the
**`true`** bullet with two tabbed panels—one <TabItem value="github"> explaining
GitHub preserves comment edit history and one <TabItem value="gitlab">
explaining GitLab silently overwrites previous outputs—while leaving the
**`false`** bullet unchanged; use the <Tabs> wrapper to contain the two
<TabItem> entries so the documentation follows the provider-specific convention.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3f7104b5-9170-4650-9205-61febd13185e

📥 Commits

Reviewing files that changed from the base of the PR and between f8a4ac6 and 4da9596.

📒 Files selected for processing (3)
  • docs/2.0/docs/pipelines/installation/branch-protection.mdx
  • docs/2.0/docs/pipelines/installation/gitlab-branch-protection.md
  • docs/2.0/reference/pipelines/configurations-as-code/api.mdx

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/2.0/reference/pipelines/configurations-as-code/api.mdx`:
- Around line 314-316: Replace the inline provider-specific sentence about the
`false` behavior with a Tabs component that has two TabItem panes labeled
"GitHub" and "GitLab"; put the existing sentence about a single comment being
updated on every push and comment-edit-history preserving previous outputs into
the GitHub TabItem, and put the sentence stating GitLab silently overwrites
previous outputs into the GitLab TabItem, ensuring the boolean option
descriptions (`**true**` and `**false**`) remain unchanged and the new
<Tabs>/<TabItem> elements replace only the provider-differing text.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 34f0c9a9-bae0-475b-bf36-5ca806abd528

📥 Commits

Reviewing files that changed from the base of the PR and between 4da9596 and 77a1489.

📒 Files selected for processing (3)
  • docs/2.0/docs/pipelines/installation/branch-protection.mdx
  • docs/2.0/docs/pipelines/installation/gitlab-branch-protection.md
  • docs/2.0/reference/pipelines/configurations-as-code/api.mdx
✅ Files skipped from review due to trivial changes (2)
  • docs/2.0/docs/pipelines/installation/gitlab-branch-protection.md
  • docs/2.0/docs/pipelines/installation/branch-protection.mdx

Comment on lines +314 to +316
- **`true`** (default) — A new comment is created for each push, preserving the full history of plan outputs.
- **`false`** — A single comment is updated on every push. On GitHub, the comment edit history preserves previous plan outputs. On GitLab, previous outputs are silently overwritten since GitLab does not have comment edit history.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use Tabs/TabItem for GitHub vs GitLab behavior differences.

Line 315 describes materially different behavior per provider, so this should be split into GitHub and GitLab tabs instead of inline text.

Suggested docs update
 - **`true`** (default) — A new comment is created for each push, preserving the full history of plan outputs.
-- **`false`** — A single comment is updated on every push. On GitHub, the comment edit history preserves previous plan outputs. On GitLab, previous outputs are silently overwritten since GitLab does not have comment edit history.
+- **`false`** — A single comment is updated on every push.
+
+<Tabs>
+  <TabItem value="github" label="GitHub" default>
+    The comment edit history preserves previous plan outputs.
+  </TabItem>
+  <TabItem value="gitlab" label="GitLab">
+    Previous outputs are overwritten because GitLab does not provide comment edit history.
+  </TabItem>
+</Tabs>

As per coding guidelines, "docs/**/*.mdx: Whenever presenting information that diverges between GitHub and GitLab, use the and components to distinguish the two sets of information UNLESS the distinction is just changing one word."

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **`true`** (default) — A new comment is created for each push, preserving the full history of plan outputs.
- **`false`** — A single comment is updated on every push. On GitHub, the comment edit history preserves previous plan outputs. On GitLab, previous outputs are silently overwritten since GitLab does not have comment edit history.
- **`true`** (default) — A new comment is created for each push, preserving the full history of plan outputs.
- **`false`** — A single comment is updated on every push.
<Tabs>
<TabItem value="github" label="GitHub" default>
The comment edit history preserves previous plan outputs.
</TabItem>
<TabItem value="gitlab" label="GitLab">
Previous outputs are overwritten because GitLab does not provide comment edit history.
</TabItem>
</Tabs>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/2.0/reference/pipelines/configurations-as-code/api.mdx` around lines 314
- 316, Replace the inline provider-specific sentence about the `false` behavior
with a Tabs component that has two TabItem panes labeled "GitHub" and "GitLab";
put the existing sentence about a single comment being updated on every push and
comment-edit-history preserving previous outputs into the GitHub TabItem, and
put the sentence stating GitLab silently overwrites previous outputs into the
GitLab TabItem, ensuring the boolean option descriptions (`**true**` and
`**false**`) remain unchanged and the new <Tabs>/<TabItem> elements replace only
the provider-differing text.

@ebeneliason
Copy link
Copy Markdown
Contributor

ebeneliason commented Apr 9, 2026

Nit: the new status_update block doesn't self-link like the others.

Resonance1584
Resonance1584 previously approved these changes Apr 9, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
docs/2.0/reference/pipelines/configurations-as-code/api.mdx (1)

322-324: ⚠️ Potential issue | 🟡 Minor

Use GitHub/GitLab tabs for the provider-specific false behavior.

Line 323 describes materially different provider behavior inline. Please split this into <Tabs>/<TabItem> blocks so each provider’s behavior is explicit and consistent with docs conventions.

Suggested update
 - **`true`** (default) — A new comment is created for each push, preserving the full history of plan outputs.
-- **`false`** — A single comment is updated on every push. On GitHub, the comment edit history preserves previous plan outputs. On GitLab, previous outputs are silently overwritten since GitLab does not have comment edit history.
+- **`false`** — A single comment is updated on every push.
+
+<Tabs>
+  <TabItem value="github" label="GitHub" default>
+    The comment edit history preserves previous plan outputs.
+  </TabItem>
+  <TabItem value="gitlab" label="GitLab">
+    Previous outputs are silently overwritten because GitLab does not provide comment edit history.
+  </TabItem>
+</Tabs>

As per coding guidelines, “docs/**/*.mdx: Whenever presenting information that diverges between GitHub and GitLab, use the <Tabs> and <TabItem> components to distinguish the two sets of information UNLESS the distinction is just changing one word.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/2.0/reference/pipelines/configurations-as-code/api.mdx` around lines 322
- 324, Replace the inline provider-specific sentence for the `false` option with
a provider-separated tabbed block using the <Tabs> and <TabItem> components:
keep the `true` line as-is, and for the `false` line create a <Tabs> containing
two <TabItem> entries labeled "GitHub" and "GitLab"; put the GitHub text "A
single comment is updated on every push. On GitHub, the comment edit history
preserves previous plan outputs." in the GitHub <TabItem> and the GitLab text "A
single comment is updated on every push. On GitLab, previous outputs are
silently overwritten since GitLab does not have comment edit history." in the
GitLab <TabItem>, ensuring the markup follows existing docs conventions for
tabs.
🧹 Nitpick comments (1)
docs/2.0/reference/pipelines/configurations-as-code/api.mdx (1)

297-327: Consider adding a self-link and a status_update attributes heading for consistency.

Line 302 introduces the block, but unlike other block docs it doesn’t point to a dedicated attributes section. Adding a “See more [below]” link and a ### \status_update` block attributes` heading above Line 317 would align this section with the rest of the page structure.

Suggested doc-structure tweak
 <HclListItemDescription>
 
 *Added in Pipelines v4.12.0*
 
 Controls how Pipelines posts status comments on pull/merge requests. Nested inside the `repository` block.
+See more [below](`#status_update-block-attributes`).
 
 </HclListItemDescription>
 <HclListItemExample>
@@
 </HclListItemExample>
 </HclListItem>
 
+### `status_update` block attributes
+
 <HclListItem name="new_comment_per_push" requirement="optional" type="boolean">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/2.0/reference/pipelines/configurations-as-code/api.mdx` around lines 297
- 327, Add a self-link and an attributes heading for the status_update block to
match other blocks: under the existing "status_update" HclListItem (nested in
the repository block) add a short "See more below" anchor that links to a new
section, then insert a heading like "### `status_update` block attributes"
(followed by the explanation of attributes such as `new_comment_per_push`) so
the `status_update` block has a dedicated attributes section consistent with
other documented blocks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@docs/2.0/reference/pipelines/configurations-as-code/api.mdx`:
- Around line 322-324: Replace the inline provider-specific sentence for the
`false` option with a provider-separated tabbed block using the <Tabs> and
<TabItem> components: keep the `true` line as-is, and for the `false` line
create a <Tabs> containing two <TabItem> entries labeled "GitHub" and "GitLab";
put the GitHub text "A single comment is updated on every push. On GitHub, the
comment edit history preserves previous plan outputs." in the GitHub <TabItem>
and the GitLab text "A single comment is updated on every push. On GitLab,
previous outputs are silently overwritten since GitLab does not have comment
edit history." in the GitLab <TabItem>, ensuring the markup follows existing
docs conventions for tabs.

---

Nitpick comments:
In `@docs/2.0/reference/pipelines/configurations-as-code/api.mdx`:
- Around line 297-327: Add a self-link and an attributes heading for the
status_update block to match other blocks: under the existing "status_update"
HclListItem (nested in the repository block) add a short "See more below" anchor
that links to a new section, then insert a heading like "### `status_update`
block attributes" (followed by the explanation of attributes such as
`new_comment_per_push`) so the `status_update` block has a dedicated attributes
section consistent with other documented blocks.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a53624b4-e54c-45e1-b78e-efeb80453e54

📥 Commits

Reviewing files that changed from the base of the PR and between 8c0e9b8 and eb1879d.

📒 Files selected for processing (1)
  • docs/2.0/reference/pipelines/configurations-as-code/api.mdx

@ZachGoldberg ZachGoldberg merged commit 001f82f into main Apr 9, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants