Showing 1 changed files with 17 additions and 0 deletions
+17
flightgear/fgcoderss
... ...
@@ -60,7 +60,24 @@ function showRSS () {
60 60
     done
61 61
 }
62 62
 
63
+function showGitlab () {
64
+    echo -e "${1^^}\n${1//[[:alnum:]]/-}"
65
+    revparse=$(git -C "$source_path/$1" rev-parse HEAD)
66
+    curl --silent https://gitlab.com/api/v4/projects/flightgear%2F${1,,}/repository/commits \
67
+    | jq -r '.[] | (.id + "|" + .title + "|" + .created_at)' \
68
+    | awk -v revparse=$revparse -F '|' '
69
+        {
70
+            printf("%s %s (%s)\n",
71
+                $1 == revparse ? "*" : " ",
72
+                $2,
73
+                strftime("%e %B", mktime(gensub(/[^0-9]/, " ", "g", $3))))
74
+        }
75
+    '
76
+}
77
+
63 78
 cat << EOF
79
+$(showGitlab OpenSceneGraph)
80
+
64 81
 $(showRSS simgear)
65 82
 
66 83
 $(showRSS flightgear)