[SPARK-47166][INFRA] Improves the HINTs of merge_spark_pr.py#45256
Closed
yaooqinn wants to merge 3 commits into
Closed
[SPARK-47166][INFRA] Improves the HINTs of merge_spark_pr.py#45256yaooqinn wants to merge 3 commits into
yaooqinn wants to merge 3 commits into
Conversation
|
|
||
| def bold_input(prompt) -> str: | ||
| return input("\033[1m%s\033[0m" % prompt) | ||
|
|
Member
There was a problem hiding this comment.
nit. We need two empty new lines, don't we?
|
|
||
|
|
||
| def print_error(msg): | ||
| print("\033[91m%s\033[0m" % msg) |
Member
There was a problem hiding this comment.
Just a question. Does this color code work in all shell and OS environments?
Member
Author
There was a problem hiding this comment.
https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
Not all terminals and operating systems, but most of them support ANSI colors
| print("Original: %s" % pr["title"]) | ||
| print("Modified: %s" % modified_title) | ||
| result = input("Would you like to use the modified title? (y/n): ") | ||
| result = bold_input("Would you like to use the modified title? (y/N): ") |
Member
There was a problem hiding this comment.
The default value suggestion looks nice to me.
Member
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Please fix the Python linter failure, @yaooqinn .
Member
|
Thank you, @yaooqinn . |
Member
Author
|
Thank you @dongjoon-hyun, merged to master |
TakawaAkirayo
pushed a commit
to TakawaAkirayo/spark
that referenced
this pull request
Mar 4, 2024
### What changes were proposed in this pull request? This improves the UX of merge_spark_pr.py - Print errors in red in order to get attention effectively  - Print prompt in bold - Print the default option for `y/n` from prompt in upper case ### Why are the changes needed? better dev UX ### Does this PR introduce _any_ user-facing change? no, committer only ### How was this patch tested? manually  ### Was this patch authored or co-authored using generative AI tooling? no Closes apache#45256 from yaooqinn/SPARK-47166. Authored-by: Kent Yao <yao@apache.org> Signed-off-by: Kent Yao <yao@apache.org>
ericm-db
pushed a commit
to ericm-db/spark
that referenced
this pull request
Mar 5, 2024
### What changes were proposed in this pull request? This improves the UX of merge_spark_pr.py - Print errors in red in order to get attention effectively  - Print prompt in bold - Print the default option for `y/n` from prompt in upper case ### Why are the changes needed? better dev UX ### Does this PR introduce _any_ user-facing change? no, committer only ### How was this patch tested? manually  ### Was this patch authored or co-authored using generative AI tooling? no Closes apache#45256 from yaooqinn/SPARK-47166. Authored-by: Kent Yao <yao@apache.org> Signed-off-by: Kent Yao <yao@apache.org>
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.
What changes were proposed in this pull request?
This improves the UX of merge_spark_pr.py
y/nfrom prompt in upper caseWhy are the changes needed?
better dev UX
Does this PR introduce any user-facing change?
no, committer only
How was this patch tested?
manually
Was this patch authored or co-authored using generative AI tooling?
no