From 1915824ce0b2bd9ceba239ff03d38b5360e2fae9 Mon Sep 17 00:00:00 2001 From: JATIN KISHORE M <122717391+JatinKishore@users.noreply.github.com> Date: Sat, 17 Feb 2024 00:55:04 +0530 Subject: [PATCH] Update list-users.sh --- github-api/list-users.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/github-api/list-users.sh b/github-api/list-users.sh index 4752523..a6c7768 100644 --- a/github-api/list-users.sh +++ b/github-api/list-users.sh @@ -1,5 +1,5 @@ #!/bin/bash - +helper() # GitHub API URL API_URL="https://api.github.com" @@ -11,6 +11,7 @@ TOKEN=$token REPO_OWNER=$1 REPO_NAME=$2 + # Function to make a GET request to the GitHub API function github_api_get { local endpoint="$1" @@ -36,6 +37,13 @@ function list_users_with_read_access { fi } +function helper{ + expected_cmd_args = 2 + if[$# -ne expected_cmd_args];then + echo "Please execute the script with required arguments" + echo "asd" +} + # Main script echo "Listing users with read access to ${REPO_OWNER}/${REPO_NAME}..."