File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,30 @@ IDP_GROUP=$3 # IdP group display name to search for
3838API=${4:- " https://api.github.com" } # GitHub API base URL (optional, defaults to github.com)
3939
4040# --- Input validation ---
41- if [ -z " $3 " ]; then
41+ if [ " $# " -lt 3 ]; then
4242 echo " Usage: $0 <enterprise> <team-name> <idp-group-name> [api-url]"
4343 echo " "
4444 echo " Example: $0 fabrikam MyTeam \" Engineering Team\" "
4545 exit 1
4646fi
4747
48+ if [ -z " $ENTERPRISE " ]; then
49+ echo " Error: enterprise slug (first argument) must not be empty."
50+ echo " Usage: $0 <enterprise> <team-name> <idp-group-name> [api-url]"
51+ exit 1
52+ fi
53+
54+ if [ -z " $TEAM " ]; then
55+ echo " Error: team name (second argument) must not be empty."
56+ echo " Usage: $0 <enterprise> <team-name> <idp-group-name> [api-url]"
57+ exit 1
58+ fi
59+
60+ if [ -z " $IDP_GROUP " ]; then
61+ echo " Error: IdP group name (third argument) must not be empty."
62+ echo " Usage: $0 <enterprise> <team-name> <idp-group-name> [api-url]"
63+ exit 1
64+ fi
4865if [ -z " $GH_PAT " ]; then
4966 echo " Error: GH_PAT environment variable is not set."
5067 echo " Set it with: export GH_PAT=ghp_abc"
You can’t perform that action at this time.
0 commit comments