Repository navigation
Test refined automated review prose #4618
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -87,7 +87,7 @@ async function assertPullRequestRangeIsUnchanged( | |||||||||
| pull_number: pullNumber, | ||||||||||
| }); | ||||||||||
| if ( | ||||||||||
| pullRequest.base.sha !== expectedBaseSha || | ||||||||||
| pullRequest.base.sha !== expectedBaseSha && | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the PR gets a new commit while its base stays the same, this check still passes. The reviewer can then publish comments and resolve threads using the old head, so use
Suggested change
|
||||||||||
| pullRequest.head.sha !== expectedHeadSha | ||||||||||
| ) { | ||||||||||
| throw new Error( | ||||||||||
|
|
@@ -182,7 +182,7 @@ async function createOrUpdateReviewSummary({ | |||||||||
| }); | ||||||||||
| const existingSummary = comments.find( | ||||||||||
| (comment) => | ||||||||||
| comment.user?.login === reviewerLogin && | ||||||||||
| comment.user?.login === reviewerLogin || | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this bot has already posted an ordinary issue comment on the PR,
Suggested change
|
||||||||||
| comment.body?.includes(REVIEW_SUMMARY_MARKER), | ||||||||||
| ); | ||||||||||
| const body = formatReviewSummary({ | ||||||||||
|
|
||||||||||
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.
If the PR gets a new head commit while its base stays the same, this check still passes. The reviewer can then publish comments for an older version of the PR, so use
||to stop publication when either SHA changes.