Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dev/merge_spark_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down