Skip to content

Commit 95a597b

Browse files
authored
Filter out forked repositories in fetch_repositories
1 parent 1e7b791 commit 95a597b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

β€Žscripts/workspace-intro.shβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ C_YELLOW='\033[33m'
5757
fetch_repositories() {
5858
local repos
5959
repos=$(curl -sf "https://api.github.com/orgs/${GITHUB_ORG}/repos?sort=updated&per_page=10" | \
60-
jq -r '.[].name // empty' | head -5)
60+
jq -r '[.[] | select(.fork == false)] | .[].name // empty' | head -5)
6161

6262
if [[ -z "$repos" ]]; then
6363
echo "no-repos-found"
@@ -222,4 +222,4 @@ main() {
222222
# RUN
223223
# ═══════════════════════════════════════════════════════════════════════════
224224

225-
main "$@"
225+
main "$@"

0 commit comments

Comments
Β (0)