Skip to content

glow-mdsol/ghMdsolGo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ghMDSOLGO

A silly little app to streamline the process of checking a users account for the correct setup and adding if ok

Configuration

The app requires a GitHub Token with User and Org permissions; this can be got from:

  • a GITHUB_AUTH_TOKEN environment variable
  • from a .netrc file.
    • looks for a machine record for api.github.com

Usage

Usage of the tool is pretty simple

Usage of ghMdsolGo:
Usage is: ghMdsol <options> <logins or repository names>
where options are:
-a, --add
  	Add User to Team ORG
-h, --help
  	Print help
-r, --reset
  	Generate the Reset link
-s, --team string
  	Specified Team (default "Team ORG")
-t, --teams
  	List User/Repo Teams  
  ```

### Examples

* User account check
  ```shell
  $ ghMdsolGo -check someuser
  
  Your account is non-conformant (no-email), please check the instructions in the room topic.
  2022/05/16 11:00:28 User someuser has no public email
  ```
* User Team check
```shell
$ ghMdsolGo -teams someuser
2022/05/16 11:55:52 Validated Pre-requisites for someuser GitHub Email: [email protected]
2022/05/16 11:55:52 User someuser is a admin of mdsol
2022/05/16 11:55:53 User someuser is a member of the following teams
2022/05/16 11:55:53 * Team Alpha (https://github.com/orgs/ORG/teams/team-alpha)
2022/05/16 11:55:53 * Team Bravo (https://github.com/orgs/ORG/teams/team-bravo)
...
  • Repository Team check
    $ ghMdsolGo -teams somerepo
    2022/05/16 11:55:53 Repository somerepo has the following teams with access:
    2022/05/16 11:55:53 * Team Alpha (https://github.com/orgs/ORG/teams/team-alpha) pull
    2022/05/16 11:55:53 * Team Bravo (https://github.com/orgs/ORG/teams/team-bravo) push
    2022/05/16 11:55:53 * Team Yankee (https://github.com/orgs/ORG/teams/team-yankee) admin
    ...
  • Reset Invite (for when SSO doesn't link correctly)
    $ ghMdsolGo -reset someuser 
    2022/05/16 12:02:04 Reset Link: https://github.com/orgs/ORG/people/someuser/sso
  • Reset Invite using email to search SSO
    $ ghMdsolGo -reset [email protected] 
    2022/05/16 12:02:04 Reset Link: https://github.com/orgs/ORG/people/someuser/sso

About

A Geoff Admin Script for GitHub

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages