cep / pagure

Forked from pagure 7 years ago
Clone

5e3931c Raise an exception when a PR was made against a branch that no longer exists

Authored and Committed by pingou 7 years ago
    Raise an exception when a PR was made against a branch that no longer exists
    
    Basically, a fork can open a PR against a certain branch of another repo
    but nothing prevents this other repo to delete that branch without
    merging that pull-request, leading to a situation where pagure crashes
    since the target branch of that pull-request no longer exists.
    
    With this commit, the pull-request will hang, open, not accessible (since
    we can't compute the diff) until the target branch is re-created by the
    admin allowing the diff to be re-generated.
    This is of course not an ideal situation but it prevents running into
    un-explained 500 errors.
    
    Relates to https://pagure.io/pagure/issue/1358
    
        
file modified
+5 -0