Skip to content

Commit

Permalink
Issue #1101. Pass along params to GitHub from comments endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Taylor committed Jun 17, 2016
1 parent a069366 commit 106bce0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webcompat/api/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,14 @@ def proxy_comments(number):
Either as an authed user, or as one of our proxy bots.
'''
params = request.args.copy()
if request.method == 'POST':
path = 'repos/{0}/{1}/comments'.format(ISSUES_PATH, number)
return api_request('post', path, data=get_comment_data(request.data))
return api_request('post', path, params=params,
data=get_comment_data(request.data))
else:
path = 'repos/{0}/{1}/comments'.format(ISSUES_PATH, number)
return api_request('get', path)
return api_request('get', path, params=params)


@api.route('/issues/<int:number>/labels', methods=['POST'])
Expand Down

0 comments on commit 106bce0

Please sign in to comment.