File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 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- 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- echo "Sent $query"
51- echo "Got $response"
52- num_hits=$(echo "$response" | jq '[.items[] | select(.repository.archived == false)] | length')
46+ num_hits=$(gh search code "org:conda-forge path:.ci_support/migrations/ filename:$migrator") \
47+ --json repository \
48+ --jq 'map(select(.repository.isArchived == false)) | length')
5349
5450 if [ "$num_hits" -gt 0 ]; then
5551 echo "Found $num_hits existing occurrences of migrator $migrator in conda-forge"
You can’t perform that action at this time.
0 commit comments