Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions webhook_server_container/libs/github_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,10 @@ def process_opened_or_synchronize_pull_request(self) -> None:
with ThreadPoolExecutor() as executor:
prepare_pull_futures.append(executor.submit(self.assign_reviewers))
prepare_pull_futures.append(
executor.submit(self._add_label, **{"label": f"{BRANCH_LABEL_PREFIX}{self.pull_request_branch}"})
executor.submit(
self._add_label,
**{"label": f"{BRANCH_LABEL_PREFIX}{self.pull_request_branch}"},
)
)
prepare_pull_futures.append(executor.submit(self.label_pull_request_by_merge_state))
prepare_pull_futures.append(executor.submit(self.set_merge_check_queued))
Expand Down Expand Up @@ -1909,8 +1912,14 @@ def get_all_required_status_checks(self) -> List[str]:
return _all_required_status_checks

def set_wip_label_based_on_title(self) -> None:
if self.pull_request.title.lower().startswith("{WIP_STR}:"):
if self.pull_request.title.lower().startswith(f"{WIP_STR}:"):
self.logger.debug(
f"{self.log_prefix} Found {WIP_STR} in {self.pull_request.title}; adding {WIP_STR} label."
)
self._add_label(label=WIP_STR)

else:
self.logger.debug(
f"{self.log_prefix} {WIP_STR} not found in {self.pull_request.title}; removing {WIP_STR} label."
)
self._remove_label(label=WIP_STR)