From 22f28a67fea442e69a7c4bb271479355440e59ff Mon Sep 17 00:00:00 2001 From: Rishikesh Jagadale <87235655+rissh@users.noreply.github.com> Date: Wed, 14 Feb 2024 21:50:03 +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..8fe92af 100644 --- a/github-api/list-users.sh +++ b/github-api/list-users.sh @@ -36,7 +36,15 @@ function list_users_with_read_access { fi } -# Main script +# Function to check if required arguments are passed +function check_arguments { + if [[ $# -ne 2 ]]; then + echo "Usage: $0 " + exit 1 + fi +} +# Main script +check_arguments "$@" echo "Listing users with read access to ${REPO_OWNER}/${REPO_NAME}..." list_users_with_read_access