Skip to content

Commit

Permalink
Add a simple script to list all pattern repos
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaldessari committed Sep 4, 2024
1 parent 57c2efe commit fb53fd1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions scripts/list-all-patterns.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -o pipefail

# Lists all repos tagged with "pattern" in the two organizations:
# - validatedpatterns
# - validatedpatterns-sandbox

ORGS=("validatedpatterns" "validatedpatterns-sandbox")
TOPIC=${TOPIC:-pattern}

for org in ${ORGS[@]}; do
REPOS=$(gh repo list "${org}" --no-archived --topic "${TOPIC}" --visibility public --limit 100 |awk '{ print $1 }' | sort)
ret=$?
if [ ${ret} -ne 0 ]; then
echo "Error retrieving pattern list for ${org}"
exit ${ret}
fi
echo "${REPOS}"
done

0 comments on commit fb53fd1

Please sign in to comment.