This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new f60d8ea1936 Fix wrong PR links shown while classifying provider
changes (#73206)
f60d8ea1936 is described below
commit f60d8ea1936c5d1830512fe2adeac7293544436a
Author: rjgoyln <[email protected]>
AuthorDate: Wed Sep 23 07:08:43 2026 +0800
Fix wrong PR links shown while classifying provider changes (#73206)
Cherry-pick, backport and revert subjects carry more than one PR
reference, and the release manager classifying them saw every reference
rendered as a link to the first number in the subject — usually the
original PR or an issue rather than the change being classified.
---
.../airflow_breeze/prepare_providers/provider_documentation.py | 8 ++------
dev/breeze/tests/test_provider_documentation.py | 10 ++++++++++
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git
a/dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py
b/dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py
index 6de99e295e0..4f16be2471e 100644
--- a/dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py
+++ b/dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py
@@ -144,12 +144,8 @@ def get_most_impactful_change(changes: list[TypeOfChange]):
return max(changes, key=lambda change: precedence_order[change])
-def format_message_for_classification(message):
- find_pr = re.search(r"#(\d+)", message)
- if find_pr:
- num = find_pr.group(1)
- message = re.sub(r"#(\d+)",
f"https://github.com/apache/airflow/pull/{num}", message)
- return message
+def format_message_for_classification(message: str) -> str:
+ return re.sub(r"#(\d+)", r"https://github.com/apache/airflow/pull/\1",
message)
class ClassifiedChanges:
diff --git a/dev/breeze/tests/test_provider_documentation.py
b/dev/breeze/tests/test_provider_documentation.py
index 25d7b493291..f8203b2fc6c 100644
--- a/dev/breeze/tests/test_provider_documentation.py
+++ b/dev/breeze/tests/test_provider_documentation.py
@@ -40,6 +40,7 @@ from airflow_breeze.prepare_providers.provider_documentation
import (
classification_result,
classify_change_deterministically,
drop_provider_to_doc_only,
+ format_message_for_classification,
get_most_impactful_change,
get_version_tag,
update_release_notes,
@@ -414,6 +415,15 @@ def test_get_most_impactful_change(changes, expected):
assert get_most_impactful_change(changes) == expected
+def
test_format_message_for_classification_links_every_reference_to_its_own_number():
+ message = "Fix td_format rendering of negative durations (#72694) (#72774)"
+ assert format_message_for_classification(message) == (
+ "Fix td_format rendering of negative durations "
+ "(https://github.com/apache/airflow/pull/72694) "
+ "(https://github.com/apache/airflow/pull/72774)"
+ )
+
+
@pytest.mark.parametrize(
("provider_id", "changed_files", "expected"),
[