review

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = koanf.New(".")

A koanf config with dot as delimiter.

Loads $XDG_CONFIG_HOME/gerritr/config.yml expecting a structure like below:

aliases:
	team1:
  	- b1@org.com
  	- b2@org.com
	team2:
  	- f1@org.com
  	- f2@org.com

Functions

func IsEmail

func IsEmail(reviewer string) bool

Checks if the given string looks like a generic email, like x@x.x

func Resolve

func Resolve(reviewersFromCmd []string) []string

Resolves reviewers from the input parameters and REVIEWERS file

For each string in the input slice,

  • If it is an email ID, adds as is
  • If it is not an email ID, assumes it to be a alias. Tries to resolve the alias from config

In parallel, reads REVIEWERS file and adds each line.

Returns a slice of resolved reviewers, with each element prefixed with "r=", as per the format required by Gerrit.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL