func New(options *Options) (*Integration, error) {
	err := validateOptions(options)
	if err != nil {
		return nil, err
	}
	gitlabOpts := []gitlab.ClientOptionFunc{}
	if options.BaseURL != "" {
		gitlabOpts = append(gitlabOpts, gitlab.WithBaseURL(options.BaseURL))
	}
	git, err := gitlab.NewClient(options.Token, gitlabOpts...)
	if err != nil {
		return nil, err
	}
	user, _, err := git.Users.CurrentUser()
	if err != nil {
		return nil, err
	}
	return &Integration{client: git, userID: user.ID, options: options}, nil
}
New creates a new issue tracker integration client based on options.
package gitlab
import (
	"fmt"
	"strings"
	"github.com/pkg/errors"
	"github.com/projectdiscovery/nuclei/v2/pkg/output"
	"github.com/projectdiscovery/nuclei/v2/pkg/reporting/format"
	"github.com/xanzy/go-gitlab"
)
type Integration struct {
	client  *gitlab.Client
	userID  int
	options *Options
}
type Options struct {
	BaseURL string `yaml:"base-url"`
	Username string `yaml:"username"`
	Token string `yaml:"token"`
	ProjectName string `yaml:"project-name"`
	IssueLabel string `yaml:"issue-label"`
	SeverityAsLabel bool `yaml:"severity-as-label"`
}