CLI Application for Support GitHub Enterprise/Organize management GitHub APIs tools
** more feature may be support on private organization but you can customize.
Update
- Add feaute list repository by team
- Add support option to support format on console log
- POC execute command
Features
-
- Init Cache (for the improve performance and query must init before use in the first time)
- Load pending caching team on pending
- Support GitHub Action for implement workflows cronjob task (github.com/corp-ais/cdc-github-manager)
-
- List Team in Organization
- List Membership of Teams
- List member in team
- List member in team status pending
- List member in team role
- List member in team Email
- List member in team Exclude another team
- List member in CSV file
- List member of Organization
- List member of Organization Show Email , Teams
- List Dormant users of the organization from CSV file
- List Repositories By Team
-
- Invite member single command
- Cancel Organization Invitation
-
- Add or Update Membership of Team with Username
- Add or Update Membership of Team with Email
-
- Remove Team Membership For User
- Remove Membership of Organization
- Remove dormant users of the organization from CSV file
- Remove Membership of Organization without membership of team and verify email
- Remove Cache log invited
-
- Import & Invite or Update Team Member from CSV Template
-
- Export or Update Team Member to CSV Template
-
- Rewrite format before import or update team Member from CSV Template file
-
- Check Team Membership for User
- Check Membership for User in ORG
- Check member for invite to team
- Check and verify csv template format
-
- Get GitHub Username from Email
- Get Primary Email from GitHub Username
Download bin file and set env path (depending on OS)
on Windows with
Command Prompt
set GHMGR_TOKEN=php_xxxxxxxxxxxxxxxxxx
set GHMGR_OWNER=xxxxx
PowerShell
$env:GHMGR_TOKEN="php_xxxxxxxxxxxxxxxxxx"
$env:GHMGR_OWNER="corp-xxx"
on Unix or MacOS
export GHMGR_TOKEN=php_xxxxxxxxxxxxxxxxxx
export GHMGR_OWNER=xxxxx
or login with app (don't on support CMD,PS)
ghmgr login --token php_xxxxxxxxxxxxxxxxxx --owner xxxxx
or on pipeline you can use option --token recommand for secret
example
ghmgr list member -t teamname --token php_xxxxxxxxxxxxxxxxxx --owner corp-xxx
for the improve performance and query must init before use in the first time
ghmgr load cache
Lists all teams in an organization that are visible to the authenticated user. https://docs.github.com/en/rest/reference/teams#list-teams
option
--option
csv to show on console log support
ghmgr list team --option [option]
Lists all repositories by team in an organization that are visible to the authenticated user.
option
--option
csv to show on console log support
--team
team name that is match slug team on GitHub
ghmgr list repos --team [teamname] --option [option]
option
-u,--username
username
ghmgr list team --username [username]
option
-t,--team
team name (team in GitHub)
ghmgr list member --team [teamname]
option
-t,--team
team name (team in GitHub)
-p,--pending
invited status pending
ghmgr list member --team [teamname] --pending
option
-t,--team
team name (team in GitHub)
-r,--role
role team
ghmgr list member --team [teamname] --role
option
-t,--team
team name (team in GitHub)
-m show,--email show
email show
ghmgr list member --team [teamname] --email show
option
-t,--team
team name (team in GitHub)
-e ,--exclude
exclude team member will be invisible
ghmgr list member --team [teamname] --exclude [teamname]
for the files workspace in : report/input/teamname.csv
option
-f,--file
Filename.CSV
ghmgr list member --file teamname.csv
option
-o,--org
Org
ghmgr list member --org
option
-o,--org
Org
-m show,--email show
Email
-t show,--team show
Teams
ghmgr list member --org --email show --team show
option
for the file workspace in : report/input/dormant-users-report-xxxxxx.csv
-f,--file
filename.csv
ghmgr list member dormant --file dormant-users-report-xxxxxx.csv
option
-t,--team
team name (team in GitHub)
-e,--email
email
ghmgr invite member --team [teamname] --email name@domain.com
option
-c,--cancel
Cancel
ghmgr invite member --cancel --email name@domain.com
option
-t,--team
team name (team in GitHub)
-u,--username
GitHub username
-r,--role
Role of Team (maintainer, member)
ghmgr add member --team [teamname] --email [name@domain.com] -r maintainer
must load cache and add verify email account before use this cmd.
option
-t,--team
team name (team in GitHub)
-m,--email
email (verify)
-r,--role
Role of Team (maintainer, member)
ghmgr add member --team [teamname] --email [name@domain.com] -r maintainer
To remove a membership between a user and a team (without Organization)
option
-t,--team
teamname (slug team name lowercase)
-u,--username
GitHub username
ghmgr remove member --team [teamname] --username [username]
To remove a membership between a user and a team (without Organization) focus public Email isn't appear.
option
-t,--team
teamname (slug team name lowercase)
-m null,--email null
email only null
ghmgr remove member -t [teamename] -m null
Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories
option
-o,--org
organization
-u,--username
GitHub username
ghmgr remove member --org --username [username]
option
-o,--org
organization
-t null,--team null
null only
ghmgr remove member -o -t null
for the file workspace in : report/input/dormant-users-report-xxxxxx.csv
option
-f,--file
filename.csv
-b,--backup
the backup file for review
ghmgr remove member dormant --file dormant-users-report-xxxx.csv --backup
the backup file output into report/output/dormant-users-report-xxxxxx.csv-review-xxxx.csv
ghmgr remove member invited --t [name] -m example@domain.com,example2@domain.com,example3domain.com
must load cache and add verify email account before use this cmd.
Attention
-
the template can update but support who configured email address at profile (email don’t empty)
-
the Project Name must lowercase only we use slug GitHub Team name (seem team url link https://github.com/orgs/owner-org/teams/team-name) e.g. “Team Name” => “team-name“
-
focus at GitHub column when
-
Y is active then do
- GitHub Username is empty will be invite member using email
- GitHub Username already but outside ORG or already in another team will be update into member team (calculate 1 license)
-
N is active when
- GitHub Username already and then will be removed from the team but still in ORG
-
Empty is not active
-
the file input template in : reports/input/team-name.csv
option
-f,--file
file name.csv (team in GitHub)
ghmgr import template --file team-name.csv
must load cache and add verify email account before use this cmd.
Attention
-
the template can update but support who configured email address at profile (email don’t empty)
-
the Project Name must lowercase only we use slug GitHub Team name (seem team url link https://github.com/orgs/owner-org/teams/team-name) e.g. “Team Name” => “team-name“
-
focus at GitHub column when
-
Y is active then do
- GitHub Username is empty will be invite member using email
- GitHub Username already but outside ORG or already in another team will be update into member team (calculate 1 license)
-
N is active when
- GitHub Username already and then will be removed from the team but still in ORG
-
Empty is not active
-
the file output template in : reports/output/team-name.csvxxx.csv
option
-t,--team
team name (team in GitHub)
ghmgr export template --team team-name
option
-t,--team
team name (team in GitHub)
ghmgr rewrite template -t [teamname]
option
-t,--team
team name (team in GitHub)
-u,--username
github username
ghmgr check member --team [team-name] --username [username]
option
-u,--username
github username
ghmgr check member --username [username]
option
-f,--file
filename.csv
ghmgr check report -f [filename].csv
option
-m,--email
GitHub Email (Primary Email)
ghmgr get member username --email name@domain.com
option
-u,--username
github username
ghmgr get member email --username [username]