Update PR Author and Reviewer checklists to use fuzzy matching#12166
Update PR Author and Reviewer checklists to use fuzzy matching#12166
Conversation
.github/actions/javascript/contributorChecklist/contributorChecklist.js
Outdated
Show resolved
Hide resolved
|
LGTM, lets test this. |
|
Agree - Let's run some tests! |
|
Updated and I think ready to go! @AndrewGable I know you have that test repo, how do I get this over there to test? (I'll take this out of draft mode once we've done a little QA). |
mountiny
left a comment
There was a problem hiding this comment.
Looks good, I think we can also simply test this by merging this, this will add it to main and then we can run a quick test in another PR. Otherwise it is mostly regex logic so we can manually tests the regex (we havent changed how we pull the Github comments so we know that works) and see if that would pass one condition by another.
| const reviewerChecklistNumber = countCheckedBoxes(completedReviewerChecklist); | ||
|
|
||
| // Once we've gathered all the data, loop through each comment and look to see if it contains a completed checklist | ||
| // Once we've gathered all the data, loop through each comment and look to see if it contains enough completed checkboxes |
There was a problem hiding this comment.
I think we can also include a word about the empty checkboxes (there should not be any)
|
I just realized that the new code would still be incorrect in this circumstance, since the checklists are close enough in length (right now 44 and 45):
Seems rare but might be worth fixing for. The author checklist will always be in the PR body, right, not a comment? If so we could just check for that when we grab it, and then loop through the comments only for the reviewer checklist. Right now the script adds it all to the same array ( |
mountiny
left a comment
There was a problem hiding this comment.
Looking into this, yeah you know the pull request body should aways be the first one in the list right? since we push it first sand then push in the other comments.
We could use this logic.
|
@dangrous It seems like I jumped the gun a little bit and we're both making some similar changes to these files. Would you be OK with closing this and we can move some of your functionality into my PR here #12429 ? The reason I'd like to stick with my PR is that it has the following improvements:
|
|
@tgolen That works for me! I was actually just thinking about the hardcodedness last night, that people changing the list would still have to change it twice. Need anything else from me other than just closing this? Happy to help further if I can. |
|
I think you can go ahead and close this out, and then I'd appreciate you reviewing my PR (which it looks like you did already, thank you!) |
|
Actually, I went ahead and closed it while I was here. |
cc @mountiny and @AndrewGable
Details
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/233287
$ https://github.com/Expensify/Expensify/issues/231992
Tests
N/A
QA Steps
N/A
PR Review Checklist
PR Author Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarhave been tested & I retested again)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)Screenshots
N/A