Skip to content

Commit

Permalink
chore: fix linting of large PRs by requesting more files in the GitHu…
Browse files Browse the repository at this point in the history
…b api call

resolves #606
  • Loading branch information
Taepper committed Oct 21, 2024
1 parent a8e69ca commit 5ac5f27
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,20 @@ jobs:
mv /src/build .
cmake -DBUILD_WITH_CLANG_TIDY=on -D CMAKE_BUILD_TYPE=Debug -B build
echo "Successfully configured cmake"
files=$(curl -s \
"https://api.github.com/repos/${{ github.repository }}/pulls/${PR_NUMBER}/files" \
files=""
PAGE=1
while true; do
page_files=$(curl -s \
"https://api.github.com/repos/${{ github.repository }}/pulls/${PR_NUMBER}/files?per_page=100&page=$PAGE" \
| jq -r '.[] | select(.status != "removed") | .filename')
# If there are no more files, break the loop
if [[ -z "$page_files" ]]; then
break
fi
files+="$page_files"$'\n'
PAGE=$((PAGE + 1))
done
echo "Changed files of this PR:"
echo "$files"
IFS=$'\n'
Expand Down

0 comments on commit 5ac5f27

Please sign in to comment.