This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v3-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-3-test by this push:
     new b170631c186 [v3-3-test] Fix wrong PR links shown while classifying 
provider changes (#73206) (#73582)
b170631c186 is described below

commit b170631c186118af58acc3340db075edab1f98d0
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Sep 28 17:36:16 2026 +0200

    [v3-3-test] Fix wrong PR links shown while classifying provider changes 
(#73206) (#73582)
    
    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.
    (cherry picked from commit f60d8ea1936c5d1830512fe2adeac7293544436a)
    
    Co-authored-by: rjgoyln <[email protected]>
---
 .../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 d7023a977ac..e736a72fcb5 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 a6d8e92633e..9e4fd67aa56 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"),
     [

Reply via email to