Skip to content

Commit 3b91d28

Browse files
committed
Minor changes
1 parent 47da794 commit 3b91d28

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

labelbot/labelbot.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def add_repos(self, repos):
5151
Args:
5252
repos: URLs of github repositories
5353
"""
54-
# get list of user/repo values to be labeled
54+
# get list of valid user/repo values
5555
repo_names = []
5656
for repo in repos:
5757
found = False
@@ -91,9 +91,9 @@ def _label_issues(self, repo):
9191
self.issues_endpoint.format(repo=repo))
9292
try:
9393
response.raise_for_status()
94-
except:
95-
# TODO
96-
pass
94+
except requests.exceptions.HTTPError:
95+
print("Couldn't obtain necessary data from GitHub. ",
96+
file=sys.stderr)
9797
issues = response.json()
9898

9999
# iterate through all isues
@@ -104,6 +104,8 @@ def _label_issues(self, repo):
104104
# get existing label strings
105105
existing_labels = [label['name'] for label in issue['labels']]
106106

107+
# skip this issue if it is already labeled and skip_labeled
108+
# flag was used
107109
if self.skip_labeled and len(existing_labels) > 0:
108110
continue
109111

0 commit comments

Comments
 (0)