GithubHelp home page GithubHelp logo

gha-manage-orgs's Introduction

gha-manage-orgs

A series of composite actions to simplifiy the management of GitHub Enterprise Organizations.

add-users

Adds users to an existing GitHub organization.

Inputs

admin-pat

Required A personal access token with [admin:org] scope.

org

Required The name of the organization to invite users to.

users

Required A comma separated list of github handles who should be made admins of the organization (e.g. tjcorr or tjcorr,otherhandle).

team-names

A comma separated list of team slugs to invite the user to (e.g. myteam or myteam,otheteam).

Example usage

- name: Invite users
  uses: tjcorr/gha-manage-orgs/add-users@main
  with:
    admin-pat: ${{ secrets.ADMIN_PAT }}
    org: "myuniqueorg"
    users: "tjcorr,otherhandle"

create-org

Creates a new GitHub Enterprise Organization.

Inputs

admin-pat

Required A personal access token with [admin:enterprise,user:email,read:user] scopes.

enterprise

Required The slug of the enterprise to create the organization in.

org

Required The name of the organization to create (this must be globally unique).

admin

Required A comma separated list of github handles who should be made admins of the organization (e.g. tjcorr or tjcorr,otherhandle).

Example usage

- name: Create temporary organization
  uses: tjcorr/gha-manage-orgs/create-org@main
  with:
    admin-pat: ${{ secrets.ADMIN_PAT }}
    enterprise: "myenterprise"
    org: "myuniqueorg"
    admin: ${{ github.actor }}

create-team

Create a team in a GitHub organization.

Inputs

admin-pat

Required A personal access token with [admin:org] scope.

org

Required The name of the organization to invite users to.

name

Required The name of the team to create.

visibility

'The visibility of the team (secret or closed). Default value is closed.'

Example usage

- name: Create team
  uses: tjcorr/gha-manage-orgs/create-team@main
  with:
    admin-pat: ${{ secrets.ADMIN_PAT }}
    org: "myuniqueorg"
    team-name: "MyTeam"

delete-org

Deletes an existing GitHub Enterprise Organization along with all contents.

Warning ⚠️ All resources within the organization will be PERMANENTLY DELETED and are not recoverable. ⚠️

Inputs

admin-pat

Required A personal access token with admin:org scope.

org

Required The name of the organization to delete.

Example usage

- name: Delete temporary organization
  uses: tjcorr/gha-manage-orgs/delete-org@main
  with:
    admin-pat: ${{ secrets.ADMIN_PAT }}
    org: "myuniqueorg"

gha-manage-orgs's People

Contributors

tjcorr avatar

Watchers

 avatar

gha-manage-orgs's Issues

Properly fail if create organization fails

The github API always seems to return a 200 even if there is an error in creating the org. We need to actually parse the output to look for errors:

e.g.

{
    "data": {
        "createEnterpriseOrganization": null
    },
    "errors": [
        {
            "type": "UNPROCESSABLE",
            "path": [
                "createEnterpriseOrganization"
            ],
            "locations": [
                {
                    "line": 2,
                    "column": 5
                }
            ],
            "message": "Organization name is not available"
        }
    ],
}

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.