Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Numpsy opened this issue Sep 7, 2024 · 0 comments · May be fixed by #2821
Open

Comments

@Numpsy
Copy link
Contributor

Numpsy commented Sep 7, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant