It syncronizes the configuration described in a YAML file against your GitHub Organization

github-sync

This tool is heavily inspired on tempelis

It syncronizes the configuration described in a YAML file against your GitHub Organization. Combined with a CI system, it can be used to implement GitOps for GitHub.

At this stage, it can:

Org Members

  • Add users to an organization
  • Remove users from an organization

Collaborators

  • Add collaborators to a repository
  • Remove collaborators from a repository

Config

Authentication

It expects a config file in the location given by --auth that looks like this:

{
    "authToken": "ic3hu6ydebbsib1yd7x5wn1nro",
    "org": "YOUR_GITHUB_ORG"
}

authToken is the GitHub Token

Users

It expects a complete list of Org Members to be provided. If a org member exists on GitHub that is not in the yaml users list, it will error out.

users:
- username: cpanato
  role: admin # possibles are `admin` / `direct_member` / `billing_manager`
  email: [email protected]
- username: honk_user
  role: admin  # possibles are `admin` / `direct_member` / `billing_manager`
  email: [email protected]

Collaborators

It expects a complete list of Repositories and Collaborators to be provided. If a collaborator exists on GitHub that is not in the yaml repositories list, it will error out.

repositories:
- name: playground
  collaborators:
  - username: username_1
    email: [email protected]
    permission: push # possibles are `pull` / `push` / `admin` / `maintain` / `triage`
  - username: username_2
    email: [email protected]
    permission: push # possibles are `pull` / `push` / `admin` / `maintain` / `triage`
- name: another_repo
  collaborators:
  - username: username_3
    email: [email protected]
    permission: push # possibles are `pull` / `push` / `admin` / `maintain` / `triage`

Future Work

Add support:

  • Repositories configuration
  • Teams
Owner
Carlos Tadeu Panato Junior
Carlos Tadeu Panato Junior
Similar Resources

Library providing routines to merge and validate JSON, YAML and/or TOML files

Library providing routines to merge and validate JSON, YAML and/or TOML files

CONFLATE Library providing routines to merge and validate JSON, YAML, TOML files and/or structs (godoc) Typical use case: Make your application config

Sep 26, 2022

YAML support for the Go language.

YAML support for the Go language Introduction The yaml package enables Go programs to comfortably encode and decode YAML values. It was developed with

Jan 8, 2023

A better way to marshal and unmarshal YAML in Golang

YAML marshaling and unmarshaling support for Go Introduction A wrapper around go-yaml designed to enable a better way of handling YAML when marshaling

Jan 4, 2023

create a bootable disk image from Docker image or a yaml config

docker2boot docker2boot creates a bootable disk from either a Docker image or a config yaml file Features status dns Y cloud-init Y network Y ssh TODO

Oct 30, 2022

YAML support for the Go language

YAML support for the Go language

YAML support for the Go language

Dec 31, 2022

Generic templating tool with support of JSON, YAML and TOML data

gotempl Small binary used to generate files from Go Templates and data files. The following formats are supported: JSON YAML TOML Usage usage: gotempl

Jun 15, 2022

Golang config.yaml loader

Description goconfig is a configuration library designed using the following pri

May 31, 2022

Tmpl - A tool to apply variables from cli, env, JSON/TOML/YAML files to templates

tmpl allows to apply variables from JSON/TOML/YAML files, environment variables or CLI arguments to template files using Golang text/template and functions from the Sprig project.

Nov 14, 2022

SmartYAML - Go package to handle YAML

SmartYAML - Go package to handle YAML The smartyaml is a go package to handle parsed YAML files more confortable. This package is not a parser, it use

Feb 25, 2022
Go-yaml - Yaml parsing Toolkit For Golang

go-yaml 介绍 gopkg.in/yaml.v3 已经是个非常好用的包,但是在实际开发中总有类型转换带来的麻烦,go-yaml只是在它的基础上,简单的一层

Jan 13, 2022
JSON or YAML configuration wrapper with convenient access methods.

Config Package config provides convenient access methods to configuration stored as JSON or YAML. This is a fork of the original version. This version

Dec 16, 2022
Golang Configuration tool that support YAML, JSON, TOML, Shell Environment

Configor Golang Configuration tool that support YAML, JSON, TOML, Shell Environment (Supports Go 1.10+) Usage package main import ( "fmt" "github.c

Dec 29, 2022
Golang library for reading properties from configuration files in JSON and YAML format or from environment variables.

go-config Golang library for reading properties from configuration files in JSON and YAML format or from environment variables. Usage Create config in

Aug 22, 2022
go implementation of lightbend's HOCON configuration library https://github.com/lightbend/config

HOCON (Human-Optimized Config Object Notation) Configuration library for working with the Lightbend's HOCON format. HOCON is a human-friendly JSON sup

Dec 3, 2022
goconfig uses a struct as input and populates the fields of this struct with parameters from command line, environment variables and configuration file.

goconfig goconfig uses a struct as input and populates the fields of this struct with parameters from command line, environment variables and configur

Dec 15, 2022
Configure is a Go package that gives you easy configuration of your project through redundancy

Configure Configure is a Go package that gives you easy configuration of your project through redundancy. It has an API inspired by negroni and the fl

Sep 26, 2022
Small library to read your configuration from environment variables

envconfig envconfig is a library which allows you to parse your configuration from environment variables and fill an arbitrary struct. See the example

Nov 3, 2022
Cfginterpolator is an interpolate library in golang allowing to include data from external sources in your configuration

cfginterpolator cfginterpolator is an interpolate library in golang allowing to include data from external sources in your configuration cfginterpolat

Dec 14, 2021