Change GitHub.createPullRequest to await the call to PullRequest.Create#2821
Draft
Numpsy wants to merge 1 commit intofsprojects:masterfrom
Draft
Change GitHub.createPullRequest to await the call to PullRequest.Create#2821Numpsy wants to merge 1 commit intofsprojects:masterfrom
Numpsy wants to merge 1 commit intofsprojects:masterfrom
Conversation
Collaborator
|
Indeed, that would be strange |
Contributor
Author
|
Given that this is a breaking API change, would it need to be held for the .NET 8 update release? |
Collaborator
|
That would be more appropriate. |
Contributor
Author
|
Ok, I'll leave until the .NET 8 changes are done |
xperiandri
approved these changes
Sep 22, 2024
77dc4e4 to
72aeb27
Compare
Collaborator
|
Should we already merge this? |
Contributor
Author
|
Is there going to be a 6.1.2 with any of the other more minor changes, or is just in to version 8 now? Also needs a release note entry |
xperiandri
reviewed
Mar 12, 2025
| let createPullRequest owner repoName (pullRequest: NewPullRequest) (client: Async<GitHubClient>) = | ||
| retryWithArg 5 client | ||
| <| fun client' -> async { return Async.AwaitTask <| client'.PullRequest.Create(owner, repoName, pullRequest) } | ||
| <| fun client' -> async { return! Async.AwaitTask <| client'.PullRequest.Create(owner, repoName, pullRequest) } |
Collaborator
There was a problem hiding this comment.
Do we really need to wrap that into async CE?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Referencing the comments in #2820, and assuming that the return type is actually wrong, I think it should be awating the
PullRequest.Createso that it gets awaited inside the retry machinery?Still a draft, as if it's a correct cfhange it needs release notes (and It'd be a breaking change to the public API)