When looking through build.fsx, I noticed the comment at
|
// when we release the GitHub module, this will be replaced with GitHub.createPullRequest API |
about changing to
GitHub.createPullRequest in the future, and thought I'd try making that change to simplify things.
Howevver, when I went to do it I noticed that the return type of createPullRequest is Async<Async<PullRequest>>, which meant that the sample didn't quite work as the result of calling Async.RunSynchronously is still Async<PullRequest>.
Ref the public documentation:

Is this correct?
Otherwise, I wonder if the async handling at
|
<| fun client' -> async { return Async.AwaitTask <| client'.PullRequest.Create(owner, repoName, pullRequest) } |
should do
return! Async.AwaitTask or maybe return the
Async.AwaitTask directly without the extra
async {} block?
When looking through build.fsx, I noticed the comment at
FAKE/build.fsx
Line 1055 in fac7295
GitHub.createPullRequestin the future, and thought I'd try making that change to simplify things.Howevver, when I went to do it I noticed that the return type of
createPullRequestisAsync<Async<PullRequest>>, which meant that the sample didn't quite work as the result of callingAsync.RunSynchronouslyis stillAsync<PullRequest>.Ref the public documentation:

Is this correct?
Otherwise, I wonder if the async handling at
FAKE/src/app/Fake.Api.GitHub/GitHub.fs
Line 472 in fac7295
return! Async.AwaitTaskor maybe return theAsync.AwaitTaskdirectly without the extraasync {}block?