-
-
Notifications
You must be signed in to change notification settings - Fork 256
ci: Add comment with explanation when a release conflict is detected #7162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| permissions: | ||
| contents: read | ||
| pull-requests: write |
There was a problem hiding this comment.
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(` |
There was a problem hiding this comment.
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.
| classifier: 'OUTDATED', | ||
| }); | ||
| } | ||
| } |
There was a problem hiding this comment.
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.
cryptodev-2s
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
9cfffe2 to
3fe207d
Compare
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:
References
Checklist
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.
check-release(.github/actions/check-release/action.yml):package-namesandhas-conflictsinstead of exiting immediately upon conflicts; final separate step now fails when conflicts exist.id: check-releaseto expose outputs..github/workflows/main.yml):contents: readandpull-requests: writepermissions tocheck-releasejob to allow commenting.Written by Cursor Bugbot for commit 3fe207d. This will update automatically on new commits. Configure here.