-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.sh
executable file
·26 lines (21 loc) · 1.04 KB
/
dashboard.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# requires: jq
json=$(curl https://api.github.com/orgs/Archtec-io/repos?per_page=100)
names=$(echo "$json" | jq -r 'sort_by(.name) | map(select(.name != "Archtec-io")) | .[].name')
if jq -e . >/dev/null 2>&1 <<<"$json"; then
echo "Got valid JSON"
else
echo "Failed to parse JSON, or got false/null"
exit 1
fi
echo -n "" > dashboard.md
echo "|Name|Last commit|Open issues|Open PR's|Contributors|" >> dashboard.md
echo "|---|---|---|---|---|" >> dashboard.md
for name in ${names}; do
link="[${name}](https://github.com/Archtec-io/${name})"
contributors=""
last_commit=""
open_issues=""
open_prs=""
echo "|${link}|${last_commit}|${open_issues}|${open_prs}|${contributors}|" >> dashboard.md
done