From 90c215eefab62bb6bcbe45322ef97a75cf8afa29 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 6 Jul 2016 19:54:38 -0400 Subject: [PATCH] include desciption as body param --- src/GitHub.App/Services/ModelService.cs | 4 ++-- src/GitHub.App/Services/PullRequestService.cs | 4 ++-- src/GitHub.App/ViewModels/PullRequestCreationViewModel.cs | 2 +- src/GitHub.Exports.Reactive/Services/IModelService.cs | 2 +- src/GitHub.Exports.Reactive/Services/IPullRequestService.cs | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/GitHub.App/Services/ModelService.cs b/src/GitHub.App/Services/ModelService.cs index 3b4f4af56c..3aaf3620ae 100644 --- a/src/GitHub.App/Services/ModelService.cs +++ b/src/GitHub.App/Services/ModelService.cs @@ -199,7 +199,7 @@ public ITrackingCollection GetRepositories(ITrackingCollection return collection; } - public IObservable CreatePullRequest(ISimpleRepositoryModel repository, string title, IBranch source, IBranch target) + public IObservable CreatePullRequest(ISimpleRepositoryModel repository, string title, string body, IBranch source, IBranch target) { var keyobs = GetUserFromCache() .Select(user => string.Format(CultureInfo.InvariantCulture, "{0}|{1}:{2}", CacheIndex.PRPrefix, user.Login, repository.Name)); @@ -207,7 +207,7 @@ public IObservable CreatePullRequest(ISimpleRepositoryModel r return Observable.Defer(() => keyobs .SelectMany(key => hostCache.PutAndUpdateIndex(key, () => - apiClient.CreatePullRequest(new NewPullRequest(title, source.Name, target.Name), + apiClient.CreatePullRequest(new NewPullRequest(title, source.Name, target.Name) { Body = body }, repository.CloneUrl.Owner, repository.CloneUrl.RepositoryName) .Select(PullRequestCacheItem.Create), diff --git a/src/GitHub.App/Services/PullRequestService.cs b/src/GitHub.App/Services/PullRequestService.cs index 64596abedd..5c3180f187 100644 --- a/src/GitHub.App/Services/PullRequestService.cs +++ b/src/GitHub.App/Services/PullRequestService.cs @@ -8,9 +8,9 @@ namespace GitHub.Services [PartCreationPolicy(CreationPolicy.Shared)] public class PullRequestService : IPullRequestService { - public IObservable CreatePullRequest(IRepositoryHost host, ISimpleRepositoryModel repository, string title, IBranch source, IBranch target) + public IObservable CreatePullRequest(IRepositoryHost host, ISimpleRepositoryModel repository, string title, string body, IBranch source, IBranch target) { - return host.ModelService.CreatePullRequest(repository, title, source, target); + return host.ModelService.CreatePullRequest(repository, title, body, source, target); } } } \ No newline at end of file diff --git a/src/GitHub.App/ViewModels/PullRequestCreationViewModel.cs b/src/GitHub.App/ViewModels/PullRequestCreationViewModel.cs index c6de5f6df8..9db906a62c 100644 --- a/src/GitHub.App/ViewModels/PullRequestCreationViewModel.cs +++ b/src/GitHub.App/ViewModels/PullRequestCreationViewModel.cs @@ -68,7 +68,7 @@ public PullRequestCreationViewModel(IRepositoryHost repositoryHost, ISimpleRepos .Subscribe(x => notifications.ShowError(BranchValidator.ValidationResult.Message)); createPullRequest = ReactiveCommand.CreateAsyncObservable(whenAnyValidationResultChanges, - _ => service.CreatePullRequest(repositoryHost, activeRepo, PRTitle, SourceBranch, TargetBranch) + _ => service.CreatePullRequest(repositoryHost, activeRepo, PRTitle, Description, SourceBranch, TargetBranch) ); createPullRequest.ThrownExceptions.Subscribe(ex => { diff --git a/src/GitHub.Exports.Reactive/Services/IModelService.cs b/src/GitHub.Exports.Reactive/Services/IModelService.cs index ded58dc9da..30486dffc1 100644 --- a/src/GitHub.Exports.Reactive/Services/IModelService.cs +++ b/src/GitHub.Exports.Reactive/Services/IModelService.cs @@ -20,7 +20,7 @@ public interface IModelService : IDisposable IObservable GetLicenses(); IObservable GetGitIgnoreTemplates(); ITrackingCollection GetPullRequests(ISimpleRepositoryModel repo, ITrackingCollection collection); - IObservable CreatePullRequest(ISimpleRepositoryModel repository, string title, IBranch source, IBranch target); + IObservable CreatePullRequest(ISimpleRepositoryModel repository, string title, string body, IBranch source, IBranch target); IObservable GetBranches(ISimpleRepositoryModel repo); IObservable InvalidateAll(); } diff --git a/src/GitHub.Exports.Reactive/Services/IPullRequestService.cs b/src/GitHub.Exports.Reactive/Services/IPullRequestService.cs index 11ac2921a2..9849b5d2e0 100644 --- a/src/GitHub.Exports.Reactive/Services/IPullRequestService.cs +++ b/src/GitHub.Exports.Reactive/Services/IPullRequestService.cs @@ -10,6 +10,6 @@ namespace GitHub.Services { public interface IPullRequestService { - IObservable CreatePullRequest(IRepositoryHost host, ISimpleRepositoryModel repository, string title, IBranch source, IBranch target); + IObservable CreatePullRequest(IRepositoryHost host, ISimpleRepositoryModel repository, string title, string body, IBranch source, IBranch target); } }