Skip to content

Conversation

HariniMalothu17
Copy link
Contributor

@HariniMalothu17 HariniMalothu17 commented Sep 22, 2025

Description

Type of Change

Erase all that don't apply.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Automation (AI changes or Github Actions to reduce effort of manual tasks)

Why

What is the motivation for this change? Add a few sentences describing the context and overall goals of the pull request's commits.

Resolves [Add Relevant Issue Here]

What

What changes were made to the codebase to solve the bug, add the functionality, etc. that you specified above.

Screenshots

Add any relevant screen captures here from before or after your changes.

Testing

If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios.

Optional: Describe the tests that you ran locally to verify your changes.

Changelog

Should this change be included in the release notes: indicate yes or no

Add a brief summary of the change to use in the release notes for the next release.

Microsoft Reviewers: Open in CodeFlow

@HariniMalothu17 HariniMalothu17 changed the title script to update tester files during integration Script to update tester files during integration Sep 22, 2025
Comment on lines +104 to +105
# List of directories that should be exact copies (from yarn validate-overrides)
$OverrideDirectories = @(

Choose a reason for hiding this comment

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

Is there a way to get the list of dirs yarn validate-overrides processes instead of hardcoding these here and risking this list from becoming stale when the command gets updated with a different list? Perhaps look at react-native-platform-override/src/Manifest.ts?

Comment on lines +4 to +8
[string]$ReactNativeRepo = "https://github.com/facebook/react-native.git",
[string]$WindowsRepoRoot = $null, # Auto-detect current repo root
[string]$TesterPath = $null, # Auto-detect tester path
[string]$IntegrationTestsPath = $null, # Auto-detect vnext\ReactCopies\IntegrationTests path
[string]$CacheDir = $null, # Auto-detect cache location

Choose a reason for hiding this comment

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

These don't seem to appear in help text as user overridable parameters. Is this expected? If yes, then aren't they better off as parameters?

Comment on lines +63 to +64
$CurrentDir = Get-Location
$SearchDir = $CurrentDir

Choose a reason for hiding this comment

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

$CurrentDir is unused, please remove.

git fetch origin 2>&1 | Out-Host

# Check if commit exists locally
$CommitExists = git rev-parse --verify "$CommitHash^{commit}" 2>$null

Choose a reason for hiding this comment

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

Drop unused $CommitExists. In fact, couldn't we drop the whole rev-parse para as it'd anyways be done below by git fetch --depth 2000 origin 2>&1 | Out-Host at line 244.


# Fetch latest changes
Write-Info "Fetching latest changes..."
git fetch origin 2>&1 | Out-Host

Choose a reason for hiding this comment

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

This would fetch all branches in react-native. Shouldn't we just fetch main? git fetch origin main would fetch only origin/main from react-native.

$CommitExists = git rev-parse --verify "$CommitHash^{commit}" 2>$null
if ($LASTEXITCODE -ne 0) {
Write-Warning "Commit $CommitHash not found locally, fetching more history..."
git fetch --depth 1000 origin 2>&1 | Out-Host

Choose a reason for hiding this comment

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

git fech --depth 1000 origin main, no?

git checkout $CommitHash --quiet 2>$null
if ($LASTEXITCODE -ne 0) {
Write-Warning "Failed to checkout $CommitHash, trying deeper fetch..."
git fetch --depth 2000 origin 2>&1 | Out-Host

Choose a reason for hiding this comment

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

git fetch --depth 2000 origin main here too if we're interested in only upstream's main.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) label Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants