Skip to content

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Nov 14, 2025

Explanation

This adds some logic to #7114 to add a comment to a pull request if a conflict was detected, either in the pull request checks or in the merge queue. Old comments will be hidden automatically as well:

image

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Enhances the release-conflict check to post a PR comment (minimizing old ones), expose outputs for conflicted package names, and conditionally fail; updates workflow permissions.

  • CI / Release conflict checks:
    • Action check-release (.github/actions/check-release/action.yml):
      • Emits outputs package-names and has-conflicts instead of exiting immediately upon conflicts; final separate step now fails when conflicts exist.
      • Adds id: check-release to expose outputs.
      • Posts a PR comment listing conflicted packages and notes merge-queue context; hides previous such comments via GraphQL minimization.
    • Workflow (.github/workflows/main.yml):
      • Grants contents: read and pull-requests: write permissions to check-release job to allow commenting.

Written by Cursor Bugbot for commit 3fe207d. This will update automatically on new commits. Configure here.

Comment on lines +70 to +72
permissions:
contents: read
pull-requests: write
Copy link
Member Author

Choose a reason for hiding this comment

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

This is needed to be able to leave a comment on pull requests.

for (const comment of data) {
if (comment.body.includes('<!-- Pull request release conflict comment -->')) {
await github.graphql(`
Copy link
Member Author

Choose a reason for hiding this comment

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

This API is only available through GraphQL for some reason.

@Mrtenz Mrtenz marked this pull request as ready for review November 14, 2025 14:45
@Mrtenz Mrtenz requested a review from a team as a code owner November 14, 2025 14:45
classifier: 'OUTDATED',
});
}
}
Copy link

Choose a reason for hiding this comment

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

Bug: Comment Failure Blocks Essential Conflict Communication

The "Hide previous comments" step runs unconditionally without continue-on-error: true, which means if it fails (due to API errors, rate limits, or network issues), the subsequent "Reply on pull request" step won't execute. This prevents users from being notified about release conflicts when the comment-hiding operation fails, causing the workflow to fail with a confusing error about hiding comments rather than the actual conflict.

Fix in Cursor Fix in Web

Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

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

LGTM!

@Mrtenz Mrtenz force-pushed the mrtenz/release-conflict-comment branch from 9cfffe2 to 3fe207d Compare November 17, 2025 11:04
@Mrtenz Mrtenz merged commit 420b45b into main Nov 17, 2025
272 checks passed
@Mrtenz Mrtenz deleted the mrtenz/release-conflict-comment branch November 17, 2025 11:08
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.

4 participants