Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit ba39d6b

Browse files
committed
Implement label removal
1 parent 495cf3c commit ba39d6b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/ci/update_pr_preview.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,14 @@ def add_label(self, pull_request, name):
113113

114114
@guard('core')
115115
def remove_label(self, pull_request, name):
116-
raise NotImplementedError()
116+
number = pull_request['number']
117+
url = '{}/repos/{}/issues/{}/labels/{}'.format(
118+
self._host, self._github_project, number, number, name
119+
)
120+
121+
logger.info('Removing label "{}" from pull request #{}"'.format(number, name))
122+
123+
request('DELETE', url)
117124

118125
@guard('core')
119126
def create_deployment(self, ref):

0 commit comments

Comments
 (0)