From c779e1975a7e2aab8505497a5ee3ac4473a3d785 Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Wed, 8 Jun 2022 16:29:36 -0700 Subject: [PATCH] Add function to get github releases --- base/.config/profile/profile.d/base.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/base/.config/profile/profile.d/base.sh b/base/.config/profile/profile.d/base.sh index 898a4ff..842e4ba 100644 --- a/base/.config/profile/profile.d/base.sh +++ b/base/.config/profile/profile.d/base.sh @@ -58,3 +58,10 @@ yaml_to_json () ( echo "${ARG}" | dasel --read yaml --write json | bat --language json fi ) + +github_releases () ( + USER=${1} + REPO=${2} + curl --silent --header "Accept: application/vnd.github.v3+json" \ + "https://api.github.com/repos/${USER}/${REPO}/releases" +)