Merged
Conversation
The function was originally synchronous which meant it would return something on regardless of whether it succeeded (a branch) or failed (an error code). This forces the client to have to check whether the returned object is an error code or an object. Change the function to be asynchronous instead so that clients can use the resolved or rejected promise to easily determine whether the branch was successfully created or not.
move lookup createFromAnnotated
Member
Author
|
I realized that the error was due to the function being synchronous and always returning something regardless of whether the function succeeded or failed. This caused the |
Collaborator
|
Thanks @rcjsuen! |
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.
Note that the test for
createFromAnnotatedis failing for me. It seems like the branch is being created even when theforceflag has not been set. I would have expected the conflict in the branch's name to prevent the tag from being created but that's not happening.The returned annotated commit does have the correct SHA-1 hash so that is not the issue. The branch that gets returned by the promise from
createFromAnnotatedhas the same SHA-1 hash as what it was originally pointing at (ergo, the master commit) so it's almost as if the function call never happened! 🤔