From 43933078d398ce83a7ec9dd191716b6c4a10a757 Mon Sep 17 00:00:00 2001 From: Ron Myers Date: Sat, 30 Nov 2019 22:21:22 -0400 Subject: [PATCH] Update GitLab MergeRequest's Labels to be an array vs a single value --- NuKeeper.Gitlab/GitlabPlatform.cs | 3 ++- NuKeeper.Gitlab/Model/MergeRequest.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NuKeeper.Gitlab/GitlabPlatform.cs b/NuKeeper.Gitlab/GitlabPlatform.cs index 173fcf2d3..bbb6f1207 100644 --- a/NuKeeper.Gitlab/GitlabPlatform.cs +++ b/NuKeeper.Gitlab/GitlabPlatform.cs @@ -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; @@ -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); diff --git a/NuKeeper.Gitlab/Model/MergeRequest.cs b/NuKeeper.Gitlab/Model/MergeRequest.cs index 351016b33..596a1d54c 100644 --- a/NuKeeper.Gitlab/Model/MergeRequest.cs +++ b/NuKeeper.Gitlab/Model/MergeRequest.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using Newtonsoft.Json; namespace NuKeeper.Gitlab.Model @@ -23,6 +24,6 @@ public class MergeRequest public bool RemoveSourceBranch { get; set; } [JsonProperty("labels")] - public string Labels { get; set; } + public IList Labels { get; set; } } }