Skip to content

Fix PR comment sections colliding for multiple integrations - #19

Merged
OliverRC merged 1 commit into
mainfrom
mooncake/reuse-comment-sections
Jul 17, 2026
Merged

Fix PR comment sections colliding for multiple integrations#19
OliverRC merged 1 commit into
mainfrom
mooncake/reuse-comment-sections

Conversation

@OliverRC

Copy link
Copy Markdown
Owner

Closes #18

Problem

When multiple kickflip PR comment integrations run within a single GitHub workflow without an explicit --action-name, they all defaulted to the default section name. Because kickflip reuses a single comment and upserts by section name, each integration overwrote the previous one — so only the last integration's output survived in the comment. (The GitHub job summary was correct because it only appends.)

Fix

Added PullRequestCommentComposer.ResolveSectionName which falls back to the --deployment-path when no explicit action name is set. Distinct flows (different deployment paths) now keep distinct sections and are combined in the shared comment instead of overwriting each other.

Key decisions

  • Fall back to deployment path for the section name when --action-name is unset (or explicitly default).
  • Root path / and no path still resolve to default (preserving existing single-flow behaviour).
  • Wired the resolver into the github pull-request handler.

Files changed

  • src/kickflip/Services/PullRequestCommentComposer.cs
  • src/kickflip/Program.cs
  • src/kickflip.Tests/PullRequestCommentComposerTests.cs
  • README.md

Verification

  • dotnet build succeeds
  • dotnet test: 55 passed, 0 failed

When multiple kickflip PR comment integrations run in the same workflow
without an explicit --action-name, they all defaulted to the 'default'
section name and overwrote each other, so only the last integration's
output survived in the reused comment.

Key decisions:
- Added PullRequestCommentComposer.ResolveSectionName which falls back to
  the deployment path when no explicit action name is set, so distinct
  flows keep distinct sections and are combined in the shared comment.
- Wired the resolver into the github pull-request handler.
- Root path '/' and no path still resolve to 'default'.

Files changed:
- src/kickflip/Services/PullRequestCommentComposer.cs
- src/kickflip/Program.cs
- src/kickflip.Tests/PullRequestCommentComposerTests.cs
- README.md
@OliverRC
OliverRC merged commit 61a0c9e into main Jul 17, 2026
1 check passed
@OliverRC
OliverRC deleted the mooncake/reuse-comment-sections branch July 17, 2026 12:53
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.

Reuse of comments is not correct, it loses some parts of it if you have more than one interaction.

2 participants