prow/cmd/branchprotector/request.go
func makeRestrictions(rp *branchprotection.Restrictions) *github.Restrictions {
	if rp == nil {
		return nil
	}
	teams := append([]string{}, sets.NewString(rp.Teams...).List()...)
	users := append([]string{}, sets.NewString(rp.Users...).List()...)
	return &github.Restrictions{
		Teams: &teams,
		Users: &users,
	}
}
func makeRestrictions(rp *branchprotection.Restrictions) *github.Restrictions {
	if rp == nil {
		return nil
	}
	teams := append([]string{}, sets.NewString(rp.Teams...).List()...)
	users := append([]string{}, sets.NewString(rp.Users...).List()...)
	return &github.Restrictions{
		Teams: &teams,
		Users: &users,
	}
}
// makeRestrictions renders restrictions into the corresponding GitHub api object.
//
// Returns nil when input restrictions is nil.
// Otherwise Teams and Users are both non-nil (empty list if unset)