File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ set -euo pipefail
1313# GitHub
1414GITHUB_ORG=" ARAS-Workspace"
1515
16+ # Excluded repositories
17+ specialExcludedRepos=(" wireguard-apple" )
18+
1619# Domain & SSH
1720DOMAIN=" aras.tc"
1821SSH_USER=" workspace"
@@ -54,10 +57,19 @@ C_YELLOW='\033[33m'
5457# GITHUB API FUNCTIONS
5558# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
5659
60+
61+
5762fetch_repositories () {
58- local repos
63+ local repos filtered_repos
64+ local jq_filter
65+
66+ # Build jq filter from excluded repos array
67+ jq_filter=$( printf ' "%s",' " ${specialExcludedRepos[@]} " )
68+ jq_filter=" [${jq_filter% ,} ]"
69+
5970 repos=$( curl -sf " https://api.github.com/orgs/${GITHUB_ORG} /repos?sort=updated&per_page=10" | \
60- jq -r ' [.[] | select(.fork == false)] | .[].name // empty' | head -15)
71+ jq -r --argjson excluded " $jq_filter " \
72+ ' [.[] | select(.fork == false) | select(.name as $n | $excluded | index($n) | not)] | .[].name // empty' | head -5)
6173
6274 if [[ -z " $repos " ]]; then
6375 echo " no-repos-found"
You canβt perform that action at this time.
0 commit comments