-
-
Notifications
You must be signed in to change notification settings - Fork 3k
When sync-typeshed fails to apply CP allow manual user merges #15591
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
Conversation
@JukkaL or @AlexWaygood any opinions about something like this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great quality-of-life improvement, thank you! Just one very small suggestion:
misc/sync-typeshed.py
Outdated
f"Commit {commit} failed to cherry pick." | ||
" In a separate shell, please manually merge and continue cherry pick." | ||
) | ||
input("Did you finish the cherry pick?") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying the script out locally, my naive expectation was that I was required to either type "y" or "n" to continue. I typed in "y", which meant that the line on the terminal was
Did you finish the cherry pick?y
Looking at the script again, you obviously don't need to type anything at all. But it still might be nice to have a space at the end here so that it doesn't look so weird if a user does input something 😆
input("Did you finish the cherry pick?") | |
input("Did you finish the cherry pick? ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, It was a quick change on my part to get feedback if it's useful. I'll actually check the return of input
😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
for more information, see https://pre-commit.ci
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
If misc/sync-typeshed.py fails to apply a cherry pick, it just fails. Let's try to give the user a chance to manually merge the CP and continue with the script.
This should block for user input only in cases where stdin is a tty. So automation should continue failing. (but the only way to test is by running it)