helper
has 26 methods (exceeds 20 allowed). Consider refactoring.
type helper struct {
client *gitlab.Client
httpURL string
}
Method helper.WriteFiles
has 5 arguments (exceeds 4 allowed). Consider refactoring.
func (h *helper) WriteFiles(ctx context.Context, pid interface{}, branch, commitMsg string,
startBranch *string, actions []CommitAction) (_ *gitlab.Commit, err error) {
Method helper.GetCreatedGroup
has 5 arguments (exceeds 4 allowed). Consider refactoring.
func (h *helper) GetCreatedGroup(ctx context.Context, parentID int,
parentFullPath string, name string, visibility string) (*gitlab.Group, error) {
Method helper.AcceptMR
has 5 arguments (exceeds 4 allowed). Consider refactoring.
func (h *helper) AcceptMR(ctx context.Context, pid interface{}, mrID int,
mergeCommitMsg *string, shouldRemoveSourceBranch *bool) (mr *gitlab.MergeRequest, err error) {
Method helper.AcceptMR
has 5 return statements (exceeds 4 allowed).
func (h *helper) AcceptMR(ctx context.Context, pid interface{}, mrID int,
mergeCommitMsg *string, shouldRemoveSourceBranch *bool) (mr *gitlab.MergeRequest, err error) {
const op = "gitlab: accept mr"
defer wlog.Start(ctx, op).StopPrint()
Similar blocks of code found in 3 locations. Consider refactoring.
func (h *helper) GetBranch(ctx context.Context, pid interface{}, branch string) (_ *gitlab.Branch, err error) {
const op = "gitlab: get branch"
defer wlog.Start(ctx, op).StopPrint()
b, rsp, err := h.client.Branches.GetBranch(pid, branch, gitlab.WithContext(ctx))
Similar blocks of code found in 3 locations. Consider refactoring.
func (h *helper) GetCommit(ctx context.Context, pid interface{}, commit string) (_ *gitlab.Commit, err error) {
const op = "gitlab: get commit"
defer wlog.Start(ctx, op).StopPrint()
c, rsp, err := h.client.Commits.GetCommit(pid, commit, gitlab.WithContext(ctx))
Similar blocks of code found in 3 locations. Consider refactoring.
func (h *helper) GetTag(ctx context.Context, pid interface{}, tag string) (_ *gitlab.Tag, err error) {
const op = "gitlab: get tag"
defer wlog.Start(ctx, op).StopPrint()
c, rsp, err := h.client.Tags.GetTag(pid, tag, gitlab.WithContext(ctx))
Similar blocks of code found in 2 locations. Consider refactoring.
func (h *helper) ListTag(ctx context.Context, pid interface{},
listTagsOptions *gitlab.ListTagsOptions) (_ []*gitlab.Tag, err error) {
const op = "gitlab: list tag"
defer wlog.Start(ctx, op).StopPrint()
Similar blocks of code found in 2 locations. Consider refactoring.
func (h *helper) ListBranch(ctx context.Context, pid interface{},
listBranchOptions *gitlab.ListBranchesOptions) (_ []*gitlab.Branch, err error) {
const op = "gitlab: list branch"
defer wlog.Start(ctx, op).StopPrint()
Similar blocks of code found in 2 locations. Consider refactoring.
func (h *helper) GetGroup(ctx context.Context, gid interface{}) (_ *gitlab.Group, err error) {
const op = "gitlab: get group"
defer wlog.Start(ctx, op).StopPrint()
group, rsp, err := h.client.Groups.GetGroup(gid, nil, gitlab.WithContext(ctx))
Similar blocks of code found in 2 locations. Consider refactoring.
func (h *helper) GetProject(ctx context.Context, pid interface{}) (_ *gitlab.Project, err error) {
const op = "gitlab: get project"
defer wlog.Start(ctx, op).StopPrint()
project, rsp, err := h.client.Projects.GetProject(pid, nil, gitlab.WithContext(ctx))
Similar blocks of code found in 2 locations. Consider refactoring.
func (h *helper) DeleteProject(ctx context.Context, pid interface{}) (err error) {
const op = "gitlab: delete project"
defer wlog.Start(ctx, op).StopPrint()
rsp, err := h.client.Projects.DeleteProject(pid, gitlab.WithContext(ctx))
Similar blocks of code found in 2 locations. Consider refactoring.
func (h *helper) DeleteGroup(ctx context.Context, gid interface{}) (err error) {
const op = "gitlab: delete group"
defer wlog.Start(ctx, op).StopPrint()
rsp, err := h.client.Groups.DeleteGroup(gid, gitlab.WithContext(ctx))
There are no issues that match your filters.