public static string ConvertToString(MergeRequestOptions options)
        {
            if (options == null)
                return null;

            using (MemoryStream stream = new MemoryStream()) {
                Serializer.Serialize(stream, options);
                stream.Flush();
                stream.Seek(0, SeekOrigin.Begin);
                using (StreamReader reader = new StreamReader(stream))
                    return reader.ReadToEnd();
            }
        }
Exemple #2
0
        public static string ConvertToString(MergeRequestOptions options)
        {
            if (options == null)
            {
                return(null);
            }

            using (MemoryStream stream = new MemoryStream()) {
                Serializer.Serialize(stream, options);
                stream.Flush();
                stream.Seek(0, SeekOrigin.Begin);
                using (StreamReader reader = new StreamReader(stream))
                    return(reader.ReadToEnd());
            }
        }
Exemple #3
0
 public void AddMergeRequestSyncInfo(bool performTesting, bool assignToService)
 {
     var mergeRequestAction = new MergeRequestSyncAction(SyncTaskName, SyncServiceName, TestServiceName, performTesting, assignToService);
     var mergeRequestOptions = new MergeRequestOptions(mergeRequestAction);
     string comment = MergeRequestOptions.ConvertToString(mergeRequestOptions);
     var mergeRequest = MergeRequest.MergeRequest;
     gitLabWrapper.AddCommentToMergeRequest(mergeRequest, comment);
     if (performTesting) {
         UpdateWebHook();
         ForceBuild(mergeRequest);
     }
 }