func ParseProjectReference(val string) (ProjectReference, error) {
	lastSlashIndex := strings.LastIndex(val, "/")
	if lastSlashIndex == -1 {
		return ProjectReference{}, fmt.Errorf("could not parse repository reference: %s", val)
	}
	return ProjectReference{
		OwnerName: val[:lastSlashIndex],
		Name:      val[lastSlashIndex+1:],
	}, nil
}
ParseProjectReference parses a repository reference from the format "ownerName/repoName"
package gitlab
import (
	"context"
	"errors"
	"fmt"
	"net/http"
	"sort"
	"strings"
	"time"
	internalHTTP "github.com/lindell/multi-gitter/internal/http"
	"github.com/lindell/multi-gitter/internal/scm"
	"github.com/xanzy/go-gitlab"
)
func New(token, baseURL string, repoListing RepositoryListing, config Config) (*Gitlab, error) {
	var options []gitlab.ClientOptionFunc
	if baseURL != "" {
		options = append(options, gitlab.WithBaseURL(baseURL))
	}
	options = append(options, gitlab.WithHTTPClient(&http.Client{
		Transport: internalHTTP.LoggingRoundTripper{},
	}))
	client, err := gitlab.NewClient(token, options...)
	if err != nil {
		return nil, err
	}
	return &Gitlab{
		RepositoryListing: repoListing,
		Config:            config,
		glClient:          client,
		token:             token,
	}, nil
}
type Gitlab struct {
	RepositoryListing
	Config   Config
	token    string
	glClient *gitlab.Client
	currentUser *gitlab.User
}
type RepositoryListing struct {
	Groups   []string
	Users    []string
	Projects []ProjectReference
}
type Config struct {
	IncludeSubgroups bool
}
type ProjectReference struct {
	OwnerName string
	Name      string
}