Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Need sample for merge 2 branch #298

Open
VitaliyNazarov opened this issue Oct 18, 2020 · 0 comments
Open

Need sample for merge 2 branch #298

VitaliyNazarov opened this issue Oct 18, 2020 · 0 comments

Comments

@VitaliyNazarov
Copy link

How to merge 2 branch?

I used this code for obtain merge commit Id

               // Merge main to rc
                var mergeParameters = new GitMergeParameters
                {
                    Comment = "Merge `main` to `rc`",
                    Parents = new List<string>
                    {
                        mainBranch.Commit.CommitId,
                        rcBranch.Commit.CommitId
                    }
                };
               var mergeRequest =  await gitClient.CreateMergeRequestAsync(mergeParameters, currentProject.Id, currentRepo.Id);
               var mergeCommitId = mergeRequest.DetailedStatus?.MergeCommitId;

How can I use the resulting mergeCommitId to merge branches?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant