Skip to content

Commit f93b809

Browse files
committed
use curl
1 parent 5de181b commit f93b809

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/migrator_uniqueness.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ jobs:
4343
echo "Checking for existing uses of migrator $migrator in conda-forge..."
4444
4545
# Search in GH-org with exact path where migrators end up
46-
num_hits=$(gh search code "org:conda-forge path:.ci_support/migrations/ filename:$filename" \
47-
--json repository \
48-
--jq 'map(select(.repository.isArchived == false)) | length')
46+
query=$(printf "org:conda-forge path:.ci_support/migrations/$filename" | jq -sRr @uri)
47+
response=$(curl -s -H "Accept: application/vnd.github+json" \
48+
-H "Authorization: token $GH_TOKEN" \
49+
"https://api.github.com/search/code?q=$query&per_page=10")
50+
num_hits=$(echo "$response" | jq '[.items[] | select(.repository.archived == false)] | length')
4951
5052
if [ "$num_hits" -gt 0 ]; then
5153
echo "Found $num_hits existing occurrences of migrator $migrator in conda-forge"

0 commit comments

Comments
 (0)