This is an automated email from the ASF dual-hosted git repository.
ruifengz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new b99bb00ea11b [SPARK-48630][INFRA] Make `merge_spark_pr` keep the
format of revert PR
b99bb00ea11b is described below
commit b99bb00ea11b3ff844629d60b2b57309dd9f2d81
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Fri Jun 21 12:44:15 2024 +0800
[SPARK-48630][INFRA] Make `merge_spark_pr` keep the format of revert PR
### What changes were proposed in this pull request?
Make `merge_spark_pr` keep the format of revert PR
### Why are the changes needed?
existing script format revert PR in this way:
```
Original: Revert "[SPARK-48591][PYTHON] Simplify the if-else branches with
`F.lit`"
Modified: [SPARK-48591][PYTHON] Revert "[] Simplify the if-else branches
with `F.lit`"
```
another example:
```
Revert "[SPARK-46937][SQL] Improve concurrency performance for
FunctionRegistry"
```
was modified to
```
[SPARK-46937][SQL] Revert "[] Improve concurrency performance for
FunctionRegistry"
```
see
https://github.com/apache/spark/commit/82a84ede6a47232fe3af86672ceea97f703b3e8a
### Does this PR introduce _any_ user-facing change?
no, infra-only
### How was this patch tested?
manually test, let me use this script to merge some PR to check
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #46988 from zhengruifeng/fix_merge_spark_pr_for_revert.
Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
---
dev/merge_spark_pr.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dev/merge_spark_pr.py b/dev/merge_spark_pr.py
index c9893fd7e5a9..5d014a6375cb 100755
--- a/dev/merge_spark_pr.py
+++ b/dev/merge_spark_pr.py
@@ -501,12 +501,19 @@ def standardize_jira_ref(text):
>>> standardize_jira_ref(
... "[SPARK-6250][SPARK-6146][SPARK-5911][SQL] Types are now reserved
words in DDL parser.")
'[SPARK-6250][SPARK-6146][SPARK-5911][SQL] Types are now reserved words in
DDL parser.'
+ >>> standardize_jira_ref(
+ ... 'Revert "[SPARK-48591][PYTHON] Simplify the if-else branches with
F.lit"')
+ 'Revert "[SPARK-48591][PYTHON] Simplify the if-else branches with F.lit"'
>>> standardize_jira_ref("Additional information for users building from
source code")
'Additional information for users building from source code'
"""
jira_refs = []
components = []
+ # If this is a Revert PR, no need to process any further
+ if text.startswith('Revert "') and text.endswith('"'):
+ return text
+
# If the string is compliant, no need to process any further
if re.search(r"^\[SPARK-[0-9]{3,6}\](\[[A-Z0-9_\s,]+\] )+\S+", text):
return text
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]