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
12 changes: 12 additions & 0 deletions webhook_server_container/libs/github_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,18 @@ def user_commands(self, command: str, reviewed_user: str, issue_comment_id: int)
self._add_label(label=WIP_STR)
self.pull_request.edit(title=f"{wip_for_title} {self.pull_request.title}")

elif _command == HOLD_LABEL_STR:
self.create_comment_reaction(issue_comment_id=issue_comment_id, reaction=REACTIONS.ok)
if reviewed_user not in self.approvers:
self.pull_request.create_issue_comment(
f"{reviewed_user} is not part of the approver, only approvers can mark pull request as hold"
)
else:
if remove:
self._remove_label(label=HOLD_LABEL_STR)
else:
self._add_label(label=HOLD_LABEL_STR)

else:
self.label_by_user_comment(
user_requested_label=_command,
Expand Down