Skip to content

Commit 2d20ff3

Browse files
authored
sha?
1 parent 3109e54 commit 2d20ff3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/Label.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: If there are changes in PublicApi.Shipped.txt, fail the workflow
1515
if: github.head_ref != 'action/ship-publicapi' # Same branch name specified in Release.yml
1616
run: |
17-
$changes = git diff --numstat --shortstat origin/${{ github.base_ref }}...${{ github.head_ref }} -- '**/PublicApi.Shipped.txt'
17+
$changes = git diff --numstat --shortstat origin/${{ github.base_ref }}...${{ github.sha }} -- '**/PublicApi.Shipped.txt'
1818
Write-Output "$changes"
1919
if ($changes) {
2020
Write-Error "Changes detected in PublicApi.Shipped.txt files. Public API changes must be shipped through the release process, not in regular pull requests."
@@ -29,7 +29,7 @@ jobs:
2929
Write-Output "This is a ship-publicapi PR, labeling as Type/Maintenance"
3030
} else {
3131
# For regular PRs, check for API changes
32-
$changes = git diff origin/${{ github.base_ref }}...${{ github.head_ref }} -- '**/PublicApi.Unshipped.txt'
32+
$changes = git diff origin/${{ github.base_ref }}...${{ github.sha }} -- '**/PublicApi.Unshipped.txt'
3333
Write-Output "$changes"
3434
3535
if ($changes) {

0 commit comments

Comments
 (0)