summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2021-07-12 20:57:58 -0600
committermo khan <mo@mokhan.ca>2021-07-12 20:57:58 -0600
commitc928decf86664cb8b9598a57bc22ae27fe2d34fc (patch)
treebc8407b3ab6233f89639fed6c8d18244c4f11583
parent6e71b33e1d12ca63e8f05dfb17afe2321b8108a2 (diff)
list the installations of the app
-rwxr-xr-xbin/jwt12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/jwt b/bin/jwt
index 8b616f8..cee1813 100755
--- a/bin/jwt
+++ b/bin/jwt
@@ -21,12 +21,18 @@ jwt = JWT.encode(
"RS256"
)
-command = [
+system([
:curl,
'-i',
"-H 'Authorization: Bearer #{jwt}'",
"-H 'Accept: application/vnd.github.v3+json'",
"https://api.github.com/app"
-].map(&:to_s).join(' ')
+].map(&:to_s).join(' '))
-system(command)
+system([
+ :curl,
+ '-i',
+ "-H 'Authorization: Bearer #{jwt}'",
+ "-H 'Accept: application/vnd.github.v3+json'",
+ "https://api.github.com/app/installations"
+].map(&:to_s).join(' '))