From 096d894a22833a0bfb75b7a1ef8a22720c931669 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Mon, 14 Feb 2022 16:40:08 +0000 Subject: [PATCH] updated github_foreach_repo.sh --- github_foreach_repo.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/github_foreach_repo.sh b/github_foreach_repo.sh index a106de34..5b47c333 100755 --- a/github_foreach_repo.sh +++ b/github_foreach_repo.sh @@ -31,6 +31,7 @@ All arguments become the command template The command template replaces the following for convenience in each iteration: +{owner} => the user or organization that owns the repo {organization}, {org} => the organization account being iterated {username}, {user} => the user account being iterated {name} => the repo name without the user prefix @@ -61,6 +62,7 @@ while read -r name; do echo "# $repo" >&2 echo "# ============================================================================ #" >&2 cmd="$cmd_template" + cmd="${cmd//\{owner\}/$user_or_org}" cmd="${cmd//\{username\}/${user:-}}" cmd="${cmd//\{user\}/${user:-}}" cmd="${cmd//\{organization\}/${GITHUB_ORGANIZATION:-}}"