]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge PR #69464 into main
authorPatrick Donnelly <pdonnell@ibm.com>
Sat, 11 Jul 2026 01:00:13 +0000 (21:00 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Sat, 11 Jul 2026 01:00:13 +0000 (21:00 -0400)
* refs/pull/69464/head:
script/ptl-tool: do not update PRs for private QA

Reviewed-by: Yuri Weinstein <yweins@redhat.com>
1  2 
src/script/ptl-tool.py

index 50e48a401822c1334bf686a359b8b0bce0f834ec,0591c59b6612d321c9584c63ec9d70e0f5c90968..02cd58065f05fdbbb0ba6ee65ceae1012a821661
@@@ -1604,32 -1604,35 +1604,35 @@@ def manage_qa_tracker(args, R, session
                  log.error(f"failed to update {issue}")
                  sys.exit(1)
  
-         for pr in added_prs:
-             body = f"This PR has been added to [{issue.subject}]({issue_url})."
-             if args.dry_run:
-                 log.info(f"[DRY RUN] Would post comment to added PR #{pr}: {body}")
-             else:
-                 endpoint = f"https://api.github.com/repos/{BASE_PROJECT}/{BASE_REPO}/issues/{pr}/comments"
-                 r = session.post(endpoint, auth=GithubBearerAuth(), data=json.dumps({'body':body}))
-                 if r.status_code == 201:
-                     log.info(f"Successfully posted added comment to PR #{pr}")
+         if getattr(issue, 'is_private', False):
+             log.info(f"QA ticket {issue.url} is private. Skipping GitHub PR updates for added/removed PRs.")
+         else:
+             for pr in added_prs:
+                 body = f"This PR has been added to [{issue.subject}]({issue_url})."
+                 if args.dry_run:
+                     log.info(f"[DRY RUN] Would post comment to added PR #{pr}: {body}")
                  else:
-                     log.error(f"Failed to post comment: {r.status_code} {r.text}")
+                     endpoint = f"https://api.github.com/repos/{BASE_PROJECT}/{BASE_REPO}/issues/{pr}/comments"
+                     r = session.post(endpoint, auth=GithubBearerAuth(), data=json.dumps({'body':body}))
+                     if r.status_code == 201:
+                         log.info(f"Successfully posted added comment to PR #{pr}")
+                     else:
+                         log.error(f"Failed to post comment: {r.status_code} {r.text}")
  
-         for pr in removed_prs:
-             body = f"This PR has been removed from [{issue.subject}]({issue_url})."
-             if args.dry_run:
-                 log.info(f"[DRY RUN] Would post comment to removed PR #{pr}: {body}")
-             else:
-                 endpoint = f"https://api.github.com/repos/{BASE_PROJECT}/{BASE_REPO}/issues/{pr}/comments"
-                 r = session.post(endpoint, auth=GithubBearerAuth(), data=json.dumps({'body':body}))
-                 if r.status_code == 201:
-                     log.info(f"Successfully posted removed comment to PR #{pr}")
+             for pr in removed_prs:
+                 body = f"This PR has been removed from [{issue.subject}]({issue_url})."
+                 if args.dry_run:
+                     log.info(f"[DRY RUN] Would post comment to removed PR #{pr}: {body}")
                  else:
-                     log.error(f"Failed to post comment: {r.status_code} {r.text}")
+                     endpoint = f"https://api.github.com/repos/{BASE_PROJECT}/{BASE_REPO}/issues/{pr}/comments"
+                     r = session.post(endpoint, auth=GithubBearerAuth(), data=json.dumps({'body':body}))
+                     if r.status_code == 201:
+                         log.info(f"Successfully posted removed comment to PR #{pr}")
+                     else:
+                         log.error(f"Failed to post comment: {r.status_code} {r.text}")
  
      elif args.create_qa:
 -        now_str = datetime.datetime.utcnow().strftime("%Y-%m-%d-%H:%M")
 +        now_str = datetime.datetime.now(datetime.UTC).strftime("%Y-%m-%d-%H:%M")
          default_subject = f"{base} integration testing by {USER} started {now_str}"
          issue_kwargs['subject'] = args.qa_subject if args.qa_subject else default_subject