]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
script: s/Backports/Backport/ 70205/head
authorKefu Chai <k.chai@proxmox.com>
Wed, 15 Jul 2026 03:27:20 +0000 (11:27 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 15 Jul 2026 03:31:11 +0000 (11:31 +0800)
when referencing the "Backport" field in tracker.ceph.com, we
used "Backports". but the field is named "Backport" not "Backports".
in this change, we replace "Backports" with "Backport" when it
references this field.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/script/ptl-tool.py
src/script/redmine-upkeep.py

index a602c025997d5f0695522bfceccddb480a7a7ef0..8bf113855d471418f5e76824193290b2039b15a5 100755 (executable)
@@ -1512,7 +1512,7 @@ class RedmineLinkageCheck(BaseAuditCheck):
             
             if not main_trackers:
                 log.warning(f"Failed to find any main trackers for PR #{orig_pr} ({pr_url})")
-                irregularities.append(f"**Orphaned Main PR:** Could not find a Redmine tracker for `main` PR #{orig_pr}. Please create a ticket, set its 'Pull Request ID', populate the 'Backports' field, and ensure it is in the 'Pending Backport' state.")
+                irregularities.append(f"**Orphaned Main PR:** Could not find a Redmine tracker for `main` PR #{orig_pr}. Please create a ticket, set its 'Pull Request ID', populate the 'Backport' field, and ensure it is in the 'Pending Backport' state.")
                 continue
             
             for main_tracker in main_trackers:
@@ -1534,7 +1534,7 @@ class RedmineLinkageCheck(BaseAuditCheck):
     
                 if not bp_trackers:
                     log.warning(f"No backport trackers found for main tracker #{main_tracker.id} ({REDMINE_ENDPOINT}/issues/{main_tracker.id}) targeting base '{base}'")
-                    irregularities.append(f"**Missing Backport Tracker:** Main tracker [#{main_tracker.id}]({REDMINE_ENDPOINT}/issues/{main_tracker.id}) does not have a backport tracker for `{base}`. Please adjust the 'Backports' field on the main tracker appropriately and remove 'backport_processed' from 'Tags (freeform)'.")
+                    irregularities.append(f"**Missing Backport Tracker:** Main tracker [#{main_tracker.id}]({REDMINE_ENDPOINT}/issues/{main_tracker.id}) does not have a backport tracker for `{base}`. Please adjust the 'Backport' field on the main tracker appropriately and remove 'backport_processed' from 'Tags (freeform)'.")
                     continue
                 
                 for bp_tracker in bp_trackers:
index da671fb404ace382d176ca4774a8bb0a799fa34c..b9a9523ecfeeb9d51eb031f162dd80a53d064df0 100755 (executable)
@@ -1029,8 +1029,8 @@ class RedmineUpkeep:
     def _transform_set_status_on_merge(self, issue_update):
         """
         Transformation: Updates the status of an issue after its associated PR is merged.
-        If the 'Backports' field contains entries, sets status to 'Pending Backport'.
-        If 'Backports' is empty, sets status to 'Resolved'.
+        If the 'Backport' field contains entries, sets status to 'Pending Backport'.
+        If 'Backport' is empty, sets status to 'Resolved'.
         """
         issue_update.logger.debug("Running _transform_set_status_on_merge")
 
@@ -1054,7 +1054,7 @@ class RedmineUpkeep:
         backports_list = [bp.strip() for bp in (backports_field_value or "").split(',') if bp.strip()]
 
         if backports_list:
-            # If 'Backports' field has entries, move to PENDING_BACKPORT
+            # If 'Backport' field has entries, move to PENDING_BACKPORT
             if current_status_id != REDMINE_STATUS_ID_PENDING_BACKPORT:
                 issue_update.logger.info(f"Backports defined: {backports_list}. Setting status to 'Pending Backport'.")
                 return issue_update.change_field('status_id', REDMINE_STATUS_ID_PENDING_BACKPORT)
@@ -1062,7 +1062,7 @@ class RedmineUpkeep:
                 issue_update.logger.info("Status is already 'Pending Backport'. No change needed.")
                 return False
         else:
-            # If 'Backports' field is empty, move to RESOLVED
+            # If 'Backport' field is empty, move to RESOLVED
             if current_status_id != REDMINE_STATUS_ID_RESOLVED:
                 issue_update.logger.info("No backports defined. Setting status to 'Resolved'.")