diff --git a/pagure/internal/__init__.py b/pagure/internal/__init__.py index 67f3bc8..c9203c2 100644 --- a/pagure/internal/__init__.py +++ b/pagure/internal/__init__.py @@ -225,11 +225,13 @@ def mergeable_request_pull(): domerge=False, ) except pygit2.GitError as err: - response = flask.jsonify({"code": "CONFLICTS", "message": "%s" % err}) + response = flask.jsonify( + {"code": "CONFLICTS", "message": "%s" % err}) response.status_code = 409 return response except pagure.exceptions.PagureException as err: - response = flask.jsonify({"code": "CONFLICTS", "message": "%s" % err}) + response = flask.jsonify( + {"code": "CONFLICTS", "message": "%s" % err}) response.status_code = 500 return response diff --git a/pagure/utils.py b/pagure/utils.py index 7f08e65..74e84e5 100644 --- a/pagure/utils.py +++ b/pagure/utils.py @@ -530,7 +530,8 @@ def get_merge_options(request, merge_status): } if merge_status == "MERGE": - if request.project.settings.get("disable_non_fast-forward_merges", False): + if request.project.settings.get( + "disable_non_fast-forward_merges", False): merge_status += "-non-ff-bad" else: merge_status += "-non-ff-ok" diff --git a/tests/test_pagure_lib_git.py b/tests/test_pagure_lib_git.py index 84d44a9..693dbef 100644 --- a/tests/test_pagure_lib_git.py +++ b/tests/test_pagure_lib_git.py @@ -1697,7 +1697,7 @@ new file mode 100644 index 0000000..60f7480 --- /dev/null +++ b/456 -@@ -0,0 +1,139 @@ +@@ -0,0 +1,141 @@ +{ + "assignee": null, + "branch": "master", @@ -1744,6 +1744,7 @@ index 0000000..60f7480 + "Only_assignee_can_merge_pull-request": false, + "Web-hooks": null, + "always_merge": false, ++ "disable_non_fast-forward_merges": false, + "fedmsg_notifications": true, + "issue_tracker": true, + "issue_tracker_read_only": false, @@ -1800,6 +1801,7 @@ index 0000000..60f7480 + "Only_assignee_can_merge_pull-request": false, + "Web-hooks": null, + "always_merge": false, ++ "disable_non_fast-forward_merges": false, + "fedmsg_notifications": true, + "issue_tracker": true, + "issue_tracker_read_only": false,