Skip to content

Commit 9e1e7a1

Browse files
author
Mike Taylor
committed
Issue #652: Account for new label scheme in the API endpoints.
1 parent e2fe3ab commit 9e1e7a1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

webcompat/api/endpoints.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ def get_issue_category(issue_category):
116116
params = request.args.copy()
117117

118118
if issue_category in category_list:
119-
params['labels'] = issue_category
119+
# add "status-" before the filter param to match the naming scheme
120+
# of the repo labels.
121+
params['labels'] = 'status-' + issue_category
120122
if g.user:
121123
issues = github.raw_request('GET', issues_path, params=params)
122124
else:
@@ -198,7 +200,9 @@ def get_category_from_search(issue_category):
198200
params = request.args.copy()
199201

200202
if issue_category in category_list:
201-
query_string = 'label:{0}'.format(issue_category)
203+
# add "status-" before the issue_category to match the naming scheme
204+
# of the repo labels.
205+
query_string = 'label:{0}'.format('status-' + issue_category)
202206
elif issue_category == 'new':
203207
query_string = ' '.join(['-label:%s' % cat for cat in category_list])
204208
query_string += ' state:open '

0 commit comments

Comments
 (0)