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?