Skip to content

🐛(ci) post the preview comment once a conflicting PR is fixed - #3053

Merged
lunika merged 1 commit into
suitenumerique:mainfrom
RoeeSivan:fix/preview-comment-after-conflict
Nov 25, 2026
Merged

lunika merged 1 commit into
suitenumerique:mainfrom
RoeeSivan:fix/preview-comment-after-conflict

Conversation

@RoeeSivan

@RoeeSivan RoeeSivan commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

GitHub runs no pull_request workflow while a pull request has a merge
conflict, and Label Preview only listens to opened and labeled. A pull
request opened or labelled preview with a conflict never gets its preview
comment, even once the conflict is fixed.

Fixes #3039

Proposal

  • also listen to synchronize and reopened, so that the push fixing the conflict posts the comment

comment-tag: preview-url keeps a single comment, updated in place, so the
extra events add no duplicate. The job is still skipped on pull requests
without the preview label.

Not run: the workflow only runs in this repository, I only checked that the
YAML parses with the four event types.

External contributions

General requirements

CI requirements

  • I made sure that all existing tests are passing
  • I have signed off my commits with git commit --signoff (DCO compliance)
  • I have signed my commits with my SSH or GPG key (git commit -S)
  • My commit messages follow the required format: <gitmoji>(type) title description
  • I have added a changelog entry under ## [Unreleased] section (if noticeable change)

AI requirements

  • I used AI assistance to produce part or all of this contribution
  • I have read, reviewed, understood and can explain the code I am submitting
  • I can jump in a call or a chat to explain my work to a maintainer

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The preview workflow now runs for pull request synchronization and reopening events, in addition to opening and labeling. The concurrency comment describes cancellation by a new event. The changelog records the fix for preview comments missing after a pull request conflict is fixed.

Estimated code review effort: 2 (Simple) | ~8 minutes

Severity of issue fixed: Low

Suggested reviewers: lunika

Merge Risk: Minimal · up to 9cac8

The preview workflow now also runs when a pull request is updated or reopened, so a preview comment can be posted once a merge conflict is fixed. The change is small, easy to revert, and affects only CI. Merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Label Preview workflow will post the preview comment once a conflicting pull request is fixed. The workflow file adds synchronize and reopened triggers, and the ch…
Description check Passed The description states the problem: GitHub runs no pull_request workflow during a merge conflict, and the Label Preview workflow listens only to opened and labeled. It proposes listening to synchroniz…
Linked Issues check Passed Issue #3039 asks that a preview comment is not lost when a PR is opened or labelled preview during a merge conflict. The suggested fix is to also listen to synchronize and reopened. At the revie…
Out of Scope Changes check Passed The whole-PR diff against the merge base (6b42c71) changes .github/workflows/label_preview.yml only in the types list and in the comments around it. The comment text describes the new event scope,…
Full details: Title check

Explanation

The title names the main change: the Label Preview workflow will post the preview comment once a conflicting pull request is fixed. The workflow file adds synchronize and reopened triggers, and the changelog records the fix for #3039. The title uses a gitmoji and the required (ci) type, matching the commit format in the description.

Full details: Description check

Explanation

The description states the problem: GitHub runs no pull_request workflow during a merge conflict, and the Label Preview workflow listens only to opened and labeled. It proposes listening to synchronize and reopened, explains why comment-tag preview-url avoids duplicates, and links issue #3039. It is directly related to the changeset.

Full details: Linked Issues check

Explanation

Issue #3039 asks that a preview comment is not lost when a PR is opened or labelled preview during a merge conflict. The suggested fix is to also listen to synchronize and reopened. At the reviewed head (9cac8cc), .github/workflows/label_preview.yml sets on.pull_request.types to [labeled, opened, synchronize, reopened]. The job if still requires the preview label. The comment-tag: preview-url setting is unchanged, so the existing comment is updated and not duplicated. The change since the previous review only edits comments in the same file and does not alter the trigger set. The requirement is a coding change and it is implemented. The issue does not request an automated test, and no workflow trigger test exists in the repository. The PR checklist item for tests is unchecked, but the issue does not require one.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff against the merge base (6b42c71) changes .github/workflows/label_preview.yml only in the types list and in the comments around it. The comment text describes the new event scope, so it is directly tied to the trigger change. The concurrency block and the job definition are unchanged. The raw summary reports a CHANGELOG.md entry under Unreleased > Fixed that documents #3039. That file was not read directly in this review. The entry is a documentation change for the same fix and is expected by the PR checklist. No unrelated change was found.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
Fix failing CI checks

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 651001d2-edda-4a6a-8bf0-15a3bf7e64e4
Commits

Reviewing files that changed from the base of the PR and between 33ffca8 and 9cac8cc.

Files selected for processing: 1

  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

GitHub runs no pull_request workflow while a pull request has a merge
conflict, and Label Preview only listened to opened and labeled: a
pull request opened or labelled preview with a conflict never got its
preview comment, even after the conflict was fixed. Listen to
synchronize and reopened too, so that the push fixing the conflict
posts it. The comment tag keeps a single comment, updated in place.

Fixes suitenumerique#3039

Signed-off-by: Roee Sivan <[email protected]>
@lunika
lunika force-pushed the fix/preview-comment-after-conflict branch from 33ffca8 to 9cac8cc Compare November 25, 2026 09:44
@lunika
lunika enabled auto-merge (squash) November 25, 2026 09:46
@lunika
lunika merged commit 39891b4 into suitenumerique:main Nov 25, 2026
46 of 47 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.

🐛(Bug) Preview comment missing when a PR is opened or labelled with a conflict

2 participants