From c4e05e75edfa86788a1ecf84c8bb382680ba4f2a Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Sat, 18 Feb 2023 14:36:02 -0500 Subject: [PATCH] build: explicitly set GitHub token for REST API call --- .github/workflows/check_required_files.yml | 2 +- .github/workflows/lint_changed_files.yml | 2 +- .github/workflows/run_affected_benchmarks.yml | 2 +- .github/workflows/run_affected_examples.yml | 2 +- .github/workflows/run_affected_tests.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check_required_files.yml b/.github/workflows/check_required_files.yml index f0d03248bee2..94468034bd0e 100644 --- a/.github/workflows/check_required_files.yml +++ b/.github/workflows/check_required_files.yml @@ -90,7 +90,7 @@ jobs: page=1 files="" while true; do - new_files=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/stdlib-js/stdlib/pulls/${{ github.event.pull_request.number }}/files?page=$page&per_page=100" | jq -r '.[] | select(.status == "added") | .filename') + new_files=$(curl -s -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}" "https://api.github.com/repos/stdlib-js/stdlib/pulls/${{ github.event.pull_request.number }}/files?page=$page&per_page=100" | jq -r '.[] | select(.status == "added") | .filename') if [ -z "$new_files" ]; then break fi diff --git a/.github/workflows/lint_changed_files.yml b/.github/workflows/lint_changed_files.yml index a2151cb029f3..4df538622a3e 100644 --- a/.github/workflows/lint_changed_files.yml +++ b/.github/workflows/lint_changed_files.yml @@ -86,7 +86,7 @@ jobs: page=1 files="" while true; do - new_files=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/stdlib-js/stdlib/pulls/${{ github.event.pull_request.number }}/files?page=$page&per_page=100" | jq -r '.[] | select(.status == "modified" or .status == "added") | .filename') + new_files=$(curl -s -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}" "https://api.github.com/repos/stdlib-js/stdlib/pulls/${{ github.event.pull_request.number }}/files?page=$page&per_page=100" | jq -r '.[] | select(.status == "modified" or .status == "added") | .filename') if [ -z "$new_files" ]; then break fi diff --git a/.github/workflows/run_affected_benchmarks.yml b/.github/workflows/run_affected_benchmarks.yml index 565647e605b8..03140e9d25e1 100644 --- a/.github/workflows/run_affected_benchmarks.yml +++ b/.github/workflows/run_affected_benchmarks.yml @@ -91,7 +91,7 @@ jobs: page=1 files="" while true; do - new_files=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/stdlib-js/stdlib/pulls/${{ github.event.pull_request.number }}/files?page=$page&per_page=100" | jq -r '.[] | select(.status == "modified" or .status == "added") | .filename') + new_files=$(curl -s -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}" "https://api.github.com/repos/stdlib-js/stdlib/pulls/${{ github.event.pull_request.number }}/files?page=$page&per_page=100" | jq -r '.[] | select(.status == "modified" or .status == "added") | .filename') if [ -z "$new_files" ]; then break fi diff --git a/.github/workflows/run_affected_examples.yml b/.github/workflows/run_affected_examples.yml index 96c1ba4ab9e8..4a24b3a3843b 100644 --- a/.github/workflows/run_affected_examples.yml +++ b/.github/workflows/run_affected_examples.yml @@ -93,7 +93,7 @@ jobs: page=1 files="" while true; do - new_files=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/stdlib-js/stdlib/pulls/${{ github.event.pull_request.number }}/files?page=$page&per_page=100" | jq -r '.[] | select(.status == "modified" or .status == "added") | .filename') + new_files=$(curl -s -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}" "https://api.github.com/repos/stdlib-js/stdlib/pulls/${{ github.event.pull_request.number }}/files?page=$page&per_page=100" | jq -r '.[] | select(.status == "modified" or .status == "added") | .filename') if [ -z "$new_files" ]; then break fi diff --git a/.github/workflows/run_affected_tests.yml b/.github/workflows/run_affected_tests.yml index 83490352b83a..4d2cff316514 100644 --- a/.github/workflows/run_affected_tests.yml +++ b/.github/workflows/run_affected_tests.yml @@ -127,7 +127,7 @@ jobs: page=1 files="" while true; do - new_files=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/stdlib-js/stdlib/pulls/${{ github.event.pull_request.number }}/files?page=$page&per_page=100" | jq -r '.[] | select(.status == "modified" or .status == "added") | .filename') + new_files=$(curl -s -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}" "https://api.github.com/repos/stdlib-js/stdlib/pulls/${{ github.event.pull_request.number }}/files?page=$page&per_page=100" | jq -r '.[] | select(.status == "modified" or .status == "added") | .filename') if [ -z "$new_files" ]; then break fi