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