Merge pull request #40177 from ClickHouse/cherry-pick-logging

Improve assignment and logging for cherry-pick and backport steps
This commit is contained in:
Mikhail f. Shiryaev 2022-08-15 13:41:52 +02:00 committed by GitHub
commit 9f3b2fafcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,8 +206,13 @@ Merge it only if you intend to backport changes to the target branch, otherwise
) )
self.cherrypick_pr.add_to_labels(Labels.LABEL_CHERRYPICK) self.cherrypick_pr.add_to_labels(Labels.LABEL_CHERRYPICK)
self.cherrypick_pr.add_to_labels(Labels.LABEL_DO_NOT_TEST) self.cherrypick_pr.add_to_labels(Labels.LABEL_DO_NOT_TEST)
if self.pr.assignee is not None: if self.pr.assignees:
self.cherrypick_pr.add_to_assignees(self.pr.assignee) logging.info(
"Assing to assignees of the original PR: %s",
", ".join(user.login for user in self.pr.assignees),
)
self.cherrypick_pr.add_to_assignees(self.pr.assignees)
logging.info("Assign to the author of the original PR: %s", self.pr.user.login)
self.cherrypick_pr.add_to_assignees(self.pr.user) self.cherrypick_pr.add_to_assignees(self.pr.user)
def create_backport(self): def create_backport(self):
@ -239,8 +244,13 @@ Merge it only if you intend to backport changes to the target branch, otherwise
head=self.backport_branch, head=self.backport_branch,
) )
self.backport_pr.add_to_labels(Labels.LABEL_BACKPORT) self.backport_pr.add_to_labels(Labels.LABEL_BACKPORT)
if self.pr.assignee is not None: if self.pr.assignees:
self.cherrypick_pr.add_to_assignees(self.pr.assignee) logging.info(
"Assing to assignees of the original PR: %s",
", ".join(user.login for user in self.pr.assignees),
)
self.cherrypick_pr.add_to_assignees(self.pr.assignees)
logging.info("Assign to the author of the original PR: %s", self.pr.user.login)
self.backport_pr.add_to_assignees(self.pr.user) self.backport_pr.add_to_assignees(self.pr.user)
@property @property