From 626dbaefbd149791cd606911e487262ade88800b Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 22 2016 15:55:03 +0000 Subject: Add support for tree_id in the API endpoint used to add comments to a PR --- diff --git a/pagure/api/fork.py b/pagure/api/fork.py index 0bd5154..4dc7153 100644 --- a/pagure/api/fork.py +++ b/pagure/api/fork.py @@ -434,6 +434,10 @@ def api_pull_request_add_comment(repo, requestid, username=None): | | | | on a specific row | | | | | of a file | +---------------+---------+--------------+-----------------------------+ + | ``tree_id`` | string | Optional | | The identifier of the | + | | | | git tree as it was when | + | | | | the comment was added | + +---------------+---------+--------------+-----------------------------+ Sample response ^^^^^^^^^^^^^^^ @@ -469,6 +473,7 @@ def api_pull_request_add_comment(repo, requestid, username=None): comment = form.comment.data commit = form.commit.data or None filename = form.filename.data or None + tree_id = form.tree_id.data or None row = form.row.data or None try: # New comment @@ -476,6 +481,7 @@ def api_pull_request_add_comment(repo, requestid, username=None): SESSION, request=request, commit=commit, + tree_id=tree_id, filename=filename, row=row, comment=comment,