Skip to content

Is the return type of Fake.Api.GitHub.createPullRequest supposed to be Async<Async<PullRequest>> ? #2820

Description

@Numpsy

When looking through build.fsx, I noticed the comment at

FAKE/build.fsx

Line 1055 in fac7295

// 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:
image

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions