Skip to content

Commit 8200755

Browse files
committed
test
1 parent fa54b20 commit 8200755

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/build_py_tools.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Verify Python Tools Changed
3333
id: verify-changed-files
3434
run: |
35-
CHANGED_FILES=$(git log -1 --name-only --pretty=format: -- tools/get.py tools/espota.py tools/gen_esp32part.py tools/gen_insights_package.py | xargs)
35+
CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD -- tools/get.py tools/espota.py tools/gen_esp32part.py tools/gen_insights_package.py | xargs)
3636
echo "all_changed_files=$CHANGED_FILES" >> $GITHUB_OUTPUT
3737
if [ -n "$CHANGED_FILES" ]; then
3838
echo "any_changed=true" >> $GITHUB_OUTPUT

.github/workflows/pre-commit.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,15 @@ jobs:
6565
GITHUB_SHA: ${{ github.sha }}
6666
run: |
6767
if [[ $IS_PR != 'true' ]]; then
68-
files_changed=$(gh api repos/espressif/arduino-esp32/commits/"$GITHUB_SHA" --jq '.files[].filename')
68+
files_changed=$(gh api repos/espressif/arduino-esp32/commits/"$GITHUB_SHA" --jq '.files[].filename' | xargs)
6969
else
70-
files_changed=$(gh pr diff "$PR_NUM" --name-only)
70+
files_changed=$(gh pr diff "$PR_NUM" --name-only | xargs)
7171
fi
7272
echo "all_changed_files=$files_changed" >> $GITHUB_OUTPUT
73-
echo "Changed files: $files_changed"
73+
echo "Changed files:"
74+
for file in $files_changed; do
75+
echo " $file"
76+
done
7477
7578
- name: Run pre-commit hooks in changed files
7679
run: pre-commit run --color=always --show-diff-on-failure --files ${{ steps.changed-files.outputs.all_changed_files }}

0 commit comments

Comments
 (0)