Changeset - aba28699ec41
[Not reviewed]
default
0 2 0
Mads Kiilerich - 11 years ago 2014-08-01 20:28:42
madski@unity3d.com
pull requests: make it possible to add comments to closed PRs

You can close a PR but you cannot close the discussion of it!
2 files changed with 6 insertions and 11 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/pullrequests.py
Show inline comments
 
@@ -634,8 +634,7 @@ class PullrequestsController(BaseRepoCon
 
            raise HTTPNotFound
 

	
 
        # load compare data into template context
 
        enable_comments = not c.pull_request.is_closed()
 
        self._load_compare_data(c.pull_request, enable_comments=enable_comments)
 
        self._load_compare_data(c.pull_request, enable_comments=True)
 

	
 
        # inline comments
 
        c.inline_cnt = 0
 
@@ -668,8 +667,6 @@ class PullrequestsController(BaseRepoCon
 
    @jsonify
 
    def comment(self, repo_name, pull_request_id):
 
        pull_request = PullRequest.get_or_404(pull_request_id)
 
        if pull_request.is_closed():
 
            raise HTTPForbidden()
 

	
 
        status = request.POST.get('changeset_status')
 
        text = request.POST.get('text')
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -321,13 +321,11 @@ ${self.repo_context_bar('showpullrequest
 
    ## render comments and inlines
 
    ${comment.generate_comments()}
 

	
 
    % if not c.pull_request.is_closed():
 
      ## main comment form and it status
 
      ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name,
 
                                pull_request_id=c.pull_request.pull_request_id),
 
                         c.current_voting_result,
 
                         is_pr=True, change_status=c.allowed_to_change_status)}
 
    %endif
 
    ## main comment form and it status
 
    ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name,
 
                              pull_request_id=c.pull_request.pull_request_id),
 
                       c.current_voting_result,
 
                       is_pr=True, change_status=c.allowed_to_change_status)}
 

	
 
    <script type="text/javascript">
 
      $(document).ready(function(){
0 comments (0 inline, 0 general)