Skip to content

Commit e6a2a28

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents 7d6544c + 2fbea47 commit e6a2a28

4 files changed

Lines changed: 24 additions & 8 deletions

File tree

.github/workflows/lint_changed_files.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,12 @@ jobs:
9494
page=$((page+1))
9595
done
9696
else
97-
# Get changed files by comparing the current commit to the commit before the push event:
98-
files=$(git diff --diff-filter=AM --name-only ${{ github.event.before }} ${{ github.event.after }})
97+
# Get changed files by comparing the current commit to the commit before the push event or with its parent:
98+
if [ "${{ github.event.before }}" == "0000000000000000000000000000000000000000" ]; then
99+
files=$(git diff --diff-filter=AM --name-only HEAD~ ${{ github.event.after }})
100+
else
101+
files=$(git diff --diff-filter=AM --name-only ${{ github.event.before }} ${{ github.event.after }})
102+
fi
99103
fi
100104
files=$(echo "$files" | tr '\n' ' ' | sed 's/ $//')
101105
echo "files=${files}" >> $GITHUB_OUTPUT

.github/workflows/run_affected_benchmarks.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,12 @@ jobs:
9999
page=$((page+1))
100100
done
101101
else
102-
# Get changed files by comparing the current commit to the commit before the push event:
103-
files=$(git diff --diff-filter=AM --name-only ${{ github.event.before }} ${{ github.event.after }})
102+
# Get changed files by comparing the current commit to the commit before the push event or with its parent:
103+
if [ "${{ github.event.before }}" == "0000000000000000000000000000000000000000" ]; then
104+
files=$(git diff --diff-filter=AM --name-only HEAD~ ${{ github.event.after }})
105+
else
106+
files=$(git diff --diff-filter=AM --name-only ${{ github.event.before }} ${{ github.event.after }})
107+
fi
104108
fi
105109
# Keep only benchmark files:
106110
files=$(echo "$files" | grep -E 'benchmark/' | tr '\n' ' ' | sed 's/ $//')

.github/workflows/run_affected_examples.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,12 @@ jobs:
101101
page=$((page+1))
102102
done
103103
else
104-
# Get changed files by comparing the current commit to the commit before the push event:
105-
files=$(git diff --diff-filter=AM --name-only ${{ github.event.before }} ${{ github.event.after }})
104+
# Get changed files by comparing the current commit to the commit before the push event or with its parent:
105+
if [ "${{ github.event.before }}" == "0000000000000000000000000000000000000000" ]; then
106+
files=$(git diff --diff-filter=AM --name-only HEAD~ ${{ github.event.after }})
107+
else
108+
files=$(git diff --diff-filter=AM --name-only ${{ github.event.before }} ${{ github.event.after }})
109+
fi
106110
fi
107111
# Keep only examples and `README.md` files:
108112
files=$(echo "$files" | grep -E 'examples/|README.md' | tr '\n' ' ' | sed 's/ $//')

.github/workflows/run_affected_tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,12 @@ jobs:
135135
page=$((page+1))
136136
done
137137
else
138-
# Get changed files by comparing the current commit to the commit before the push event:
139-
files=$(git diff --diff-filter=AM --name-only ${{ github.event.before }} ${{ github.event.after }})
138+
# Get changed files by comparing the current commit to the commit before the push event or with its parent:
139+
if [ "${{ github.event.before }}" == "0000000000000000000000000000000000000000" ]; then
140+
files=$(git diff --diff-filter=AM --name-only HEAD~ ${{ github.event.after }})
141+
else
142+
files=$(git diff --diff-filter=AM --name-only ${{ github.event.before }} ${{ github.event.after }})
143+
fi
140144
fi
141145
directories=$(for file in $files; do dirname $file; done | uniq | tr '\n' ' ' | sed 's/ $//')
142146
echo "directories=${directories}" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)