Git Product home page Git Product logo

gh-org-admin-promote's Introduction

gh-org-admin-promote

GitHub CLI extension to promote an enterprise admin to an organization admin for all orgs in the enterprise. This is an API-first replacement of ghe-org-admin-promote on GitHub Enterprise Server. It also outputs an inventory of all organizations in the enterprise as a CSV file.

Should work on all supported versions of GitHub Enterprise Server, as well as GitHub Enterprise Cloud.

Permissions check

Important

This requires the admin:enterprise and admin:org scopes, which are only available to enterprise owners and not default for logging in to the gh cli.

Run ghe auth status to check your permissions. You should see admin:enterprise and admin:org in the list of scopes.

$ gh auth status

ghes-test-instance.com
  โœ“ Logged in to ghes-test-instance.com account some-natalie (keyring)
  - Active account: true
  - Git operations protocol: https
  - Token: gho_************************************
  - Token scopes: 'admin:enterprise', 'admin:org', 'gist', 'repo', 'workflow'

If you don't, do the following to add the right scopes:

gh auth refresh -s admin:enterprise -s admin:org -h ghes-test-instance.com

Installation

gh extension install some-natalie/gh-org-admin-promote

Usage

$ export GH_HOST=ghes-test-instance.com  # option for GHES, defaults to github.com

$ gh org-admin-promote enterprise-name

Getting total count of organizations in github...
Total count of organizations in github: 4
Getting list of organizations in github...
Promoting user to admin for testorg-00002...
User promoted to admin for testorg-00002
Promoting user to admin for testorg-00003...
User promoted to admin for testorg-00003

Limitations

This will promote you to own all organizations, but it will not capture anything in a user-namespaced repository (e.g. some-natalie/gh-org-admin-promote). If you need reporting on all of these, for GHES, use the all_repositories.csv report to get a list.

gh-org-admin-promote's People

Contributors

tjcorr avatar some-natalie avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.