Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 90c215e

Browse files
author
Jasmine
committed
include desciption as body param
1 parent 16cdf7c commit 90c215e

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/GitHub.App/Services/ModelService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,15 @@ public ITrackingCollection<IRepositoryModel> GetRepositories(ITrackingCollection
199199
return collection;
200200
}
201201

202-
public IObservable<IPullRequestModel> CreatePullRequest(ISimpleRepositoryModel repository, string title, IBranch source, IBranch target)
202+
public IObservable<IPullRequestModel> CreatePullRequest(ISimpleRepositoryModel repository, string title, string body, IBranch source, IBranch target)
203203
{
204204
var keyobs = GetUserFromCache()
205205
.Select(user => string.Format(CultureInfo.InvariantCulture, "{0}|{1}:{2}", CacheIndex.PRPrefix, user.Login, repository.Name));
206206

207207
return Observable.Defer(() => keyobs
208208
.SelectMany(key =>
209209
hostCache.PutAndUpdateIndex(key, () =>
210-
apiClient.CreatePullRequest(new NewPullRequest(title, source.Name, target.Name),
210+
apiClient.CreatePullRequest(new NewPullRequest(title, source.Name, target.Name) { Body = body },
211211
repository.CloneUrl.Owner,
212212
repository.CloneUrl.RepositoryName)
213213
.Select(PullRequestCacheItem.Create),

src/GitHub.App/Services/PullRequestService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ namespace GitHub.Services
88
[PartCreationPolicy(CreationPolicy.Shared)]
99
public class PullRequestService : IPullRequestService
1010
{
11-
public IObservable<IPullRequestModel> CreatePullRequest(IRepositoryHost host, ISimpleRepositoryModel repository, string title, IBranch source, IBranch target)
11+
public IObservable<IPullRequestModel> CreatePullRequest(IRepositoryHost host, ISimpleRepositoryModel repository, string title, string body, IBranch source, IBranch target)
1212
{
13-
return host.ModelService.CreatePullRequest(repository, title, source, target);
13+
return host.ModelService.CreatePullRequest(repository, title, body, source, target);
1414
}
1515
}
1616
}

src/GitHub.App/ViewModels/PullRequestCreationViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public PullRequestCreationViewModel(IRepositoryHost repositoryHost, ISimpleRepos
6868
.Subscribe(x => notifications.ShowError(BranchValidator.ValidationResult.Message));
6969

7070
createPullRequest = ReactiveCommand.CreateAsyncObservable(whenAnyValidationResultChanges,
71-
_ => service.CreatePullRequest(repositoryHost, activeRepo, PRTitle, SourceBranch, TargetBranch)
71+
_ => service.CreatePullRequest(repositoryHost, activeRepo, PRTitle, Description, SourceBranch, TargetBranch)
7272
);
7373
createPullRequest.ThrownExceptions.Subscribe(ex =>
7474
{

src/GitHub.Exports.Reactive/Services/IModelService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public interface IModelService : IDisposable
2020
IObservable<LicenseItem> GetLicenses();
2121
IObservable<GitIgnoreItem> GetGitIgnoreTemplates();
2222
ITrackingCollection<IPullRequestModel> GetPullRequests(ISimpleRepositoryModel repo, ITrackingCollection<IPullRequestModel> collection);
23-
IObservable<IPullRequestModel> CreatePullRequest(ISimpleRepositoryModel repository, string title, IBranch source, IBranch target);
23+
IObservable<IPullRequestModel> CreatePullRequest(ISimpleRepositoryModel repository, string title, string body, IBranch source, IBranch target);
2424
IObservable<IBranch> GetBranches(ISimpleRepositoryModel repo);
2525
IObservable<Unit> InvalidateAll();
2626
}

src/GitHub.Exports.Reactive/Services/IPullRequestService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ namespace GitHub.Services
1010
{
1111
public interface IPullRequestService
1212
{
13-
IObservable<IPullRequestModel> CreatePullRequest(IRepositoryHost host, ISimpleRepositoryModel repository, string title, IBranch source, IBranch target);
13+
IObservable<IPullRequestModel> CreatePullRequest(IRepositoryHost host, ISimpleRepositoryModel repository, string title, string body, IBranch source, IBranch target);
1414
}
1515
}

0 commit comments

Comments
 (0)