From 543a468314f3cd03a17e7c5b74103cc70ecc93ba Mon Sep 17 00:00:00 2001 From: lucas-zmroczek-apl <107074248+lucas-zmroczek-apl@users.noreply.github.com> Date: Fri, 29 Mar 2024 16:49:15 -0400 Subject: [PATCH 1/4] handle nested repos in init for GitLab --- initialize/initialize.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/initialize/initialize.go b/initialize/initialize.go index 4630586..d7c4db4 100644 --- a/initialize/initialize.go +++ b/initialize/initialize.go @@ -109,7 +109,8 @@ func reposFromFile(p *lib.Provider, file string) ([]lib.Repo, error) { // in case file ends with newline, ignore it continue } - parts := strings.Split(item, "/") + // GitLab may have nested directories + parts := strings.SplitN(item, "/", 2) if len(parts) != 2 { return []lib.Repo{}, fmt.Errorf("unable determine repo from line, expected format '{org}/{repo}': %s", item) } From 617f92317b94dc9cb498d911cdb5c14ed23fae1e Mon Sep 17 00:00:00 2001 From: lucas-zmroczek-apl <107074248+lucas-zmroczek-apl@users.noreply.github.com> Date: Fri, 29 Mar 2024 16:49:15 -0400 Subject: [PATCH 2/4] handle nested repos in init for GitLab --- initialize/initialize.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/initialize/initialize.go b/initialize/initialize.go index 4630586..d7c4db4 100644 --- a/initialize/initialize.go +++ b/initialize/initialize.go @@ -109,7 +109,8 @@ func reposFromFile(p *lib.Provider, file string) ([]lib.Repo, error) { // in case file ends with newline, ignore it continue } - parts := strings.Split(item, "/") + // GitLab may have nested directories + parts := strings.SplitN(item, "/", 2) if len(parts) != 2 { return []lib.Repo{}, fmt.Errorf("unable determine repo from line, expected format '{org}/{repo}': %s", item) } From d4ce9632cef7daf57e361df54e92fd08e5d66f82 Mon Sep 17 00:00:00 2001 From: lucas-zmroczek-apl <107074248+lucas-zmroczek-apl@users.noreply.github.com> Date: Mon, 28 Oct 2024 09:17:18 -0400 Subject: [PATCH 3/4] fix RebaseMergeRequest call --- merge/mergeGitlab.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/merge/mergeGitlab.go b/merge/mergeGitlab.go index 00c8a0b..f497e55 100644 --- a/merge/mergeGitlab.go +++ b/merge/mergeGitlab.go @@ -64,9 +64,9 @@ func GitlabMerge(ctx context.Context, input Input, repoLimiter *time.Ticker, mer return Output{Success: false}, fmt.Errorf("MR is not approved. Review state is %s", mr.State) } } - // Try to rebase master if Diverged Commits greates that zero + // Try to rebase master if Diverged Commits greater than zero if mr.DivergedCommitsCount > 0 { - _, err := client.MergeRequests.RebaseMergeRequest(pid, input.PRNumber, ctxFunc) + _, err := client.MergeRequests.RebaseMergeRequest(pid, input.PRNumber, &gitlab.RebaseMergeRequestOptions{}, ctxFunc) if err != nil { return Output{Success: false}, fmt.Errorf("Failed to rebase from master") } From d7b3a69aad3dbdff1ac1c7bb369e5afbfbb67ba6 Mon Sep 17 00:00:00 2001 From: lucas-zmroczek-apl <107074248+lucas-zmroczek-apl@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:13:35 -0400 Subject: [PATCH 4/4] Update VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index bb951c8..155069a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.34 +0.0.35