GithubHelp home page GithubHelp logo

gitwand's Introduction

Управление Github-ом

Краткое описание

На Github-е лежат репозитории всех проектов компании. Туда имеют доступ все команды разработки, все разработчики, тестировщики, аналитики и другие люди. В репозитории gitwand живёт код для управления всем этим хозяйством.

Ответственные

Manage your organization at Github:

  • Pointedly: only that will be changed what has to be changed.
  • Fast: as it does not do anything excessive.
  • Simply: all configs are in YAML.
  • Say enough! to cryptic nicknames in your configs. Here you can use real names of your fellows.

Organization

Describe all your organizations in vars/github/orgs/, one per file. Typically you have only one organization, say my_org. Then place it in my_org.yml like this:

my_org:
  name: My Organization
  admin:
    - admin1
    - admin2
  member:
    - dude3
    - dude4
  • name (required) is a name of you organization at Github.
  • All other parameters are optional.
  • Notice these lists are closed. If you place here someone, they will be added to your organization. If you remove someone, they will be removed.

Organization members

Place them all in vars/users/, one per file:

john.smith:
  github: johnny-smith # his nickname at Github

Teams

Place all your teams in vars/github/teams/, one per file:

my_team:
  privacy: closed / secret
  parent: parent_team
  maintainer:
    - admin1
    - admin2
  member:
    - dude3
    - dude4
  • privacy (required) determines visibility of the team.
  • All other parameters are optional.
  • Notice teams members lists are closed and operate the same way as a list of organization's members.

Repositories

Here is where the real work is going. Describe your repositories in vars/github/repos, one per file:

my_repo:
  archived: true / false # this is one direction road: once archived the repo can be unarchived via web only
  default_branch: master
  description: >-
    Brief description.  Try to fit it in one line.  As linefeeds are not allowed here.
  has_issues: true / false
  has_wiki: true / false
  homepage: https://example.com
  language: PHP
  private: true / false
  teams:
    admin:
      ## List of admin teams.  Any member of an admin team will have admin access to this repo.
      - team1
      - team2
    push:
      ## List of teams with push access.
      - all
    pull:
      ## List of teams who can only read this repo.
      - team3
      - team4
  collaborators:
    direct:
      ## List of scattered admins.
      - admin0
    outside:
      ## Not members of your organization.  Think about freelancers.  They'll get push access to this repo.
      - freelancer
  • All parameters are optional.
  • If you have a large number of repositories it's okay to have here only few. We're not going to touch anything else, what's not described here.
  • Those lists of teams and collaborators are closed as in other places.

How to use it

So far so good? Aren't you tired with describing all your staff? Let's now play with it. :-)

To apply changes in your organization members run:

ansible-playbook playbooks/gitwand.yml -e github_members__state=present

Have changed only one user? Would like to update just him or her? Do like following. And don't forget, we use real names (not their own nicknames at Github) here as described in vars/users/.

ansible-playbook playbooks/gitwand.yml -e github_members__state=present -e github_members__include=john.smith

Update all your teams:

ansible-playbook playbooks/gitwand.yml -e github_teams__state=present

Or better just one:

ansible-playbook playbooks/gitwand.yml -e github_teams__state=present -e github_teams__include=my_team

Dump all your teams:

ansible-playbook playbooks/gitwand.yml -e github_teams__state=dump

And sure, you can dump info about only one team as well:

ansible-playbook playbooks/gitwand.yml -e github_teams__state=dump -e github_teams__include=my_team

The same about repos. Update all your repositories at once:

ansible-playbook playbooks/gitwand.yml -e github_repos__state=present

Or better update only one repo:

ansible-playbook playbooks/gitwand.yml -e github_repos__state=present -e github_repos__include=my_repo

Dump all repos:

ansible-playbook playbooks/gitwand.yml -e github_repos__state=dump

Or dump only one repo:

ansible-playbook playbooks/gitwand.yml -e github_repos__state=dump -e github_repos__include=my_repo

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.