From: Kefu Chai Date: Wed, 15 Jul 2026 03:27:20 +0000 (+0800) Subject: script: s/Backports/Backport/ X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c98598d388dca042e477e3573747d88dec3f2b1e;p=ceph.git script: s/Backports/Backport/ 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 --- diff --git a/src/script/ptl-tool.py b/src/script/ptl-tool.py index a602c025997d..8bf113855d47 100755 --- a/src/script/ptl-tool.py +++ b/src/script/ptl-tool.py @@ -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: diff --git a/src/script/redmine-upkeep.py b/src/script/redmine-upkeep.py index da671fb404ac..b9a9523ecfee 100755 --- a/src/script/redmine-upkeep.py +++ b/src/script/redmine-upkeep.py @@ -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'.")