Skip to content

Commit 80eda91

Browse files
committed
go back but fix variable name
1 parent d28e6d0 commit 80eda91

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

.github/workflows/migrator_uniqueness.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,9 @@ 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-
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"

0 commit comments

Comments
 (0)