You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# check to see if organizations is null - null error message is confusing otherwise
49
-
if [ -z"$organizations" ] || [ $?-ne 0 ]
50
-
then
51
-
# Define color codes
52
-
RED='\033[0;31m'
53
-
NC='\033[0m'# No Color
54
-
55
-
# Print colored messages
42
+
if [ -z"$organizations" ] || [[ "$organizations"==*"INSUFFICIENT_SCOPES"* ]];then
56
43
echo -e "${RED}No organizations found for enterprise: $enterpriseslug${NC}"
57
-
echo -e "${RED}Check that you have the proper scopes for enterprise, e.g.: 'gh auth refresh -h github.com -s read:org -s read:enterprise'${NC}"
44
+
echo -e "${RED} - Check that you have the proper scopes for enterprise with 'gh auth status' - you need at least 'read:enterprise'${NC}"
45
+
echo -e "${RED} - You can run 'gh auth refresh -h github.com -s read:org -s read:enterprise' to add the scopes${NC}"
46
+
echo -e "${RED} - Or you can run 'gh auth login -h github.com' and authenticate using a PAT with the proper scopes${NC}"
58
47
exit 1
59
48
fi
60
49
61
50
if [ "$format"=="tsv" ];then
62
-
echo -e "Org Login\tOrg Name\tOrg Desc\tDefault Repo Permission\tMembers Can Create Repos\t\tMembers Allowed Repos Creation Type\tMembers Can Create Public Repos\tMembers Can Create Private Repos\tMembers Can Create Internal Repos\tMembers Can Fork Private Repos"
51
+
echo -e "Organization Login\tDisplay Name\tDescription\tDefault Repo Permission\tMembers Can Create Repos\t\tMembers Allowed Repos Creation Type\tMembers Can Create Public Repos\tMembers Can Create Private Repos\tMembers Can Create Internal Repos\tMembers Can Fork Private Repos"
0 commit comments