Skip to content

Commit

Permalink
ci: use targetBranch and not head
Browse files Browse the repository at this point in the history
  • Loading branch information
psarras committed Nov 29, 2024
1 parent 8570980 commit 3ab8f31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion impact-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ stages:
git fetch origin
git status
$gitChanges = git diff --name-only HEAD~1 HEAD
$targetBranch = $(System.PullRequest.TargetBranch)
$gitChanges = git diff --name-only $targetBranch HEAD
$unitTestsChanged = $false
$integrationTestsChanged = $false
Expand All @@ -52,6 +53,8 @@ stages:
Write-Output "Integration=$integrationTestsChanged"
echo "##vso[task.setvariable variable=Integration]$integrationTestsChanged"
displayName: 'Detect Changes in Repo'
- powershell: |
$files = git diff HEAD~1 --name-only | Where-Object { $_ -like "*.cs" -and $_ -notlike "*Tests.cs" }
- stage: ImpactTestingUnit
displayName: 'Impact Testing (Unit)'
Expand Down

0 comments on commit 3ab8f31

Please sign in to comment.