-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[No QA] Cross-check the files touched by a PR in typecheck #31599
Conversation
No C+ review needed here |
So this PR injects the missing GitHub token env value? |
Nope, the |
# - git diff is used to see the files that were added on this branch | ||
# - gh pr view is used to list files touched by this PR. Git diff may give false positives if the branch isn't up-to-date with main | ||
# - wc counts the words in the result of the intersection | ||
count_new_js=$(comm -1 -2 <(git diff --name-only --diff-filter=A origin/main HEAD -- 'src/libs/*.js' 'src/hooks/*.js' 'src/styles/*.js' 'src/languages/*.js') <(gh pr view ${{ github.event.pull_request.number }} --json files | jq -r '.files | map(.path) | .[]') | wc -l) |
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.
ah I see so this is the meat
so this line is counting how many new JavaScript files (in a specified directoreis) have been added in the current branch compared to the main branch? and you're using gh pr view
because git diff
might compare the current branch with the outdated main? And then you're making sure the newly added JS files are zero.
If this is the case, the logic seems correct. LGTM
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.
Yep, that's all correct.
thanks for the approval @hayata-suenaga, and your understanding is correct, so I think this should be ready for checklist + merge |
Reviewer Checklist
Screenshots/VideosAndroid: NativeN/A Android: mWeb ChromeN/A iOS: NativeN/A iOS: mWeb SafariN/A MacOS: Chrome / SafariN/A MacOS: DesktopN/A |
@roryabraham I got this message
When I run the test command locally I think this command supposed to parse JSON right? Do I have to install it on my computer? |
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.
As Hayata noted when running this locally it says zsh: command not found: jq
. I fixed this with brew install jq
. It sounds like Ubuntu doesn't come with jq either, so I think we will need to install it in the script or use something else.
sudo apt-get update
sudo apt-get install jq
Oh, interesting. You should both install
So there's no extra installation steps needed here |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 1.4.3-0 🚀
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 1.4.3-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.4.3-11 🚀
|
Details
This PR shows an example of this JS-ban typecheck thing giving a false negative. This PR fixes that.
Fixed Issues
$ #31598
Tests
You can run this locally using whatever PR you want:
Offline tests
None.
QA Steps
None.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop