Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Update GitLab MergeRequest's Labels to be an array vs a single value #902

Merged
merged 1 commit into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion NuKeeper.Gitlab/GitlabPlatform.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using NuKeeper.Abstractions.CollaborationModels;
Expand Down Expand Up @@ -51,7 +52,7 @@ public async Task OpenPullRequest(ForkData target, PullRequestRequest request, I
TargetBranch = request.BaseRef,
Id = $"{projectName}/{repositoryName}",
RemoveSourceBranch = request.DeleteBranchAfterMerge,
Labels = labels.JoinWithCommas()
Labels = labels.ToList()
};

await _client.OpenMergeRequest(projectName, repositoryName, mergeRequest);
Expand Down
3 changes: 2 additions & 1 deletion NuKeeper.Gitlab/Model/MergeRequest.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using Newtonsoft.Json;

namespace NuKeeper.Gitlab.Model
Expand All @@ -23,6 +24,6 @@ public class MergeRequest
public bool RemoveSourceBranch { get; set; }

[JsonProperty("labels")]
public string Labels { get; set; }
public IList<string> Labels { get; set; }
}
}