diff --git a/pagure/ui/fork.py b/pagure/ui/fork.py index 4023fdc..c061145 100644 --- a/pagure/ui/fork.py +++ b/pagure/ui/fork.py @@ -30,7 +30,7 @@ import pagure.lib import pagure.lib.git import pagure.forms from pagure import (APP, SESSION, LOG, login_required, is_repo_admin, - __get_file_in_tree, repo_method) + __get_file_in_tree) @@ -133,7 +133,6 @@ def _get_pr_info(repo_obj, orig_repo, branch_from, branch_to): @APP.route('//pull-requests') @APP.route('/fork///pull-requests/') @APP.route('/fork///pull-requests') -@repo_method def request_pulls(repo, username=None): """ Request pulling the changes from the fork into the project. """ @@ -205,7 +204,6 @@ def request_pulls(repo, username=None): @APP.route('//pull-request/') @APP.route('/fork///pull-request//') @APP.route('/fork///pull-request/') -@repo_method def request_pull(repo, requestid, username=None): """ Request pulling the changes from the fork into the project. """ @@ -289,7 +287,6 @@ def request_pull(repo, requestid, username=None): @APP.route('//pull-request/.patch') @APP.route('/fork///pull-request/.patch') -@repo_method def request_pull_patch(repo, requestid, username=None): """ Returns the commits from the specified pull-request as patches. """ @@ -364,7 +361,6 @@ def request_pull_patch(repo, requestid, username=None): @APP.route('/fork///pull-request//edit', methods=('GET', 'POST')) @login_required -@repo_method def request_pull_edit(repo, requestid, username=None): """ Edit the title of a pull-request. """ @@ -427,7 +423,6 @@ def request_pull_edit(repo, requestid, username=None): @APP.route('/fork///pull-request//comment/' '//', methods=('GET', 'POST')) @login_required -@repo_method def pull_request_add_comment( repo, requestid, commit=None, filename=None, row=None, username=None): @@ -508,7 +503,6 @@ def pull_request_add_comment( '/fork///pull-request//comment/drop', methods=['POST']) @login_required -@repo_method def pull_request_drop_comment(repo, requestid, username=None): """ Delete a comment of a pull-request. """ @@ -571,7 +565,6 @@ def pull_request_drop_comment(repo, requestid, username=None): '/fork///pull-request//comment' '//edit', methods=('GET', 'POST')) @login_required -@repo_method def pull_request_edit_comment(repo, requestid, commentid, username=None): """Edit comment of a pull request """ @@ -650,7 +643,6 @@ def pull_request_edit_comment(repo, requestid, commentid, username=None): @APP.route('/fork///pull-request//merge', methods=['POST']) @login_required -@repo_method def merge_request_pull(repo, requestid, username=None): """ Request pulling the changes from the fork into the project. """ @@ -723,7 +715,6 @@ def merge_request_pull(repo, requestid, username=None): @APP.route('/fork///pull-request/cancel/', methods=['POST']) @login_required -@repo_method def cancel_request_pull(repo, requestid, username=None): """ Cancel request pulling request. """ @@ -774,7 +765,6 @@ def cancel_request_pull(repo, requestid, username=None): '/fork///pull-request//assign', methods=['POST']) @login_required -@repo_method def set_assignee_requests(repo, requestid, username=None): ''' Assign a pull-request. ''' repo = flask.g.repo @@ -826,7 +816,6 @@ def set_assignee_requests(repo, requestid, username=None): @APP.route('/do_fork/', methods=['POST']) @APP.route('/do_fork/fork//', methods=['POST']) @login_required -@repo_method def fork_project(repo, username=None): """ Fork the project specified into the user's namespace """ @@ -881,7 +870,6 @@ def fork_project(repo, username=None): @APP.route( '/fork///diff/..', methods=('GET', 'POST')) -@repo_method def new_request_pull(repo, branch_to, branch_from, username=None): """ Request pulling the changes from the fork into the project. """ @@ -1016,7 +1004,6 @@ def new_request_pull(repo, branch_to, branch_from, username=None): @APP.route( '/fork///diff/remote', methods=('GET', 'POST')) @login_required -@repo_method def new_remote_request_pull(repo, username=None): """ Request pulling the changes from a remote fork into the project. """ @@ -1157,7 +1144,6 @@ def new_remote_request_pull(repo, username=None): '/fork_edit/fork///edit//' 'f/', methods=['POST']) @login_required -@repo_method def fork_edit_file(repo, branchname, filename, username=None): """ Fork the project specified and open the specific file to edit """ diff --git a/pagure/ui/repo.py b/pagure/ui/repo.py index 12cf37c..24cf80e 100644 --- a/pagure/ui/repo.py +++ b/pagure/ui/repo.py @@ -48,7 +48,7 @@ import pagure.forms import pagure import pagure.ui.plugins from pagure import (APP, SESSION, LOG, __get_file_in_tree, login_required, - is_repo_admin, admin_session_timedout, repo_method) + is_repo_admin, admin_session_timedout) @APP.route('/.git') @@ -65,7 +65,6 @@ def view_repo_git(repo, username=None): @APP.route('/') @APP.route('/fork///') @APP.route('/fork//') -@repo_method def view_repo(repo, username=None): """ Front page of a specific repo. """ @@ -162,7 +161,6 @@ def view_repo(repo, username=None): @APP.route('//branch/') @APP.route('/fork///branch/') -@repo_method def view_repo_branch(repo, branchname, username=None): ''' Returns the list of branches in the repo. ''' @@ -260,7 +258,6 @@ def view_repo_branch(repo, branchname, username=None): @APP.route('/fork///commits/') @APP.route('/fork///commits') @APP.route('/fork///commits/') -@repo_method def view_commits(repo, branchname=None, username=None): """ Displays the commits of the specified repo. """ @@ -366,7 +363,6 @@ def view_commits(repo, branchname=None, username=None): @APP.route('//c/..') @APP.route('/fork///c/../') @APP.route('/fork///c/..') -@repo_method def compare_commits(repo, commit1, commit2, username=None): """ Compares two commits for specified repo """ @@ -432,7 +428,6 @@ def compare_commits(repo, commit1, commit2, username=None): @APP.route('//blob//f/') @APP.route( '/fork///blob//f/') -@repo_method def view_file(repo, identifier, filename, username=None): """ Displays the content of a file or a tree for the specified repo. """ @@ -561,7 +556,6 @@ def view_file(repo, identifier, filename, username=None): defaults={'filename': None}) @APP.route( '/fork///raw//f/') -@repo_method def view_raw_file(repo, identifier, filename=None, username=None): """ Displays the raw content of a file of a commit for the specified repo. """ @@ -667,7 +661,6 @@ if APP.config.get('OLD_VIEW_COMMIT_ENABLED', False): @APP.route('//c/') @APP.route('/fork///c//') @APP.route('/fork///c/') -@repo_method def view_commit(repo, commitid, username=None): """ Render a commit in a repo """ @@ -712,7 +705,6 @@ def view_commit(repo, commitid, username=None): @APP.route('//c/.patch') @APP.route('/fork///c/.patch') -@repo_method def view_commit_patch(repo, commitid, username=None): """ Render a commit in a repo as patch """ @@ -739,7 +731,6 @@ def view_commit_patch(repo, commitid, username=None): @APP.route('/fork///tree/') @APP.route('/fork///tree') @APP.route('/fork///tree/') -@repo_method def view_tree(repo, identifier=None, username=None): """ Render the tree of the repo """ @@ -808,7 +799,6 @@ def view_tree(repo, identifier=None, username=None): @APP.route('//forks') @APP.route('/fork///forks/') @APP.route('/fork///forks') -@repo_method def view_forks(repo, username=None): """ Presents all the forks of the project. """ @@ -828,7 +818,6 @@ def view_forks(repo, username=None): @APP.route('//releases') @APP.route('/fork///releases/') @APP.route('/fork///releases') -@repo_method def view_tags(repo, username=None): """ Presents all the tags of the project. """ @@ -903,7 +892,6 @@ def new_release(repo, username=None): @APP.route('/fork///settings/', methods=('GET', 'POST')) @APP.route('/fork///settings', methods=('GET', 'POST')) @login_required -@repo_method def view_settings(repo, username=None): """ Presents the settings of the project. """ @@ -1202,7 +1190,6 @@ def update_milestones(repo, username=None): @APP.route('//default/branch/', methods=['POST']) @APP.route('/fork///default/branch/', methods=['POST']) @login_required -@repo_method def change_ref_head(repo, username=None): """ Change HEAD reference """ @@ -1243,7 +1230,6 @@ def change_ref_head(repo, username=None): @APP.route('//delete', methods=['POST']) @APP.route('/fork///delete', methods=['POST']) @login_required -@repo_method def delete_repo(repo, username=None): """ Delete the present project. """ @@ -1300,7 +1286,6 @@ def delete_repo(repo, username=None): @APP.route('//hook_token', methods=['POST']) @APP.route('/fork///hook_token', methods=['POST']) @login_required -@repo_method def new_repo_hook_token(repo, username=None): """ Re-generate a hook token for the present project. """ @@ -1342,7 +1327,6 @@ def new_repo_hook_token(repo, username=None): @APP.route('/fork///dropuser/', methods=['POST']) @login_required -@repo_method def remove_user(repo, userid, username=None): """ Remove the specified user from the project. """ @@ -1399,7 +1383,6 @@ def remove_user(repo, userid, username=None): @APP.route('/fork///adduser/', methods=('GET', 'POST')) @APP.route('/fork///adduser', methods=('GET', 'POST')) @login_required -@repo_method def add_user(repo, username=None): """ Add the specified user from the project. """ @@ -1457,7 +1440,6 @@ def add_user(repo, username=None): @APP.route( '/fork///dropgroup/', methods=['POST']) @login_required -@repo_method def remove_group_project(repo, groupid, username=None): """ Remove the specified group from the project. """ @@ -1515,7 +1497,6 @@ def remove_group_project(repo, groupid, username=None): @APP.route('/fork///addgroup/', methods=('GET', 'POST')) @APP.route('/fork///addgroup', methods=('GET', 'POST')) @login_required -@repo_method def add_group_project(repo, username=None): """ Add the specified group from the project. """ @@ -1624,7 +1605,6 @@ def regenerate_git(repo, username=None): @APP.route('/fork///token/new/', methods=('GET', 'POST')) @APP.route('/fork///token/new', methods=('GET', 'POST')) @login_required -@repo_method def add_token(repo, username=None): """ Add a token to a specified project. """ @@ -1677,7 +1657,6 @@ def add_token(repo, username=None): @APP.route('/fork///token/revoke/', methods=['POST']) @login_required -@repo_method def revoke_api_token(repo, token_id, username=None): """ Revokie a token to a specified project. """ @@ -1729,7 +1708,6 @@ def revoke_api_token(repo, token_id, username=None): '/fork///edit//f/', methods=('GET', 'POST')) @login_required -@repo_method def edit_file(repo, branchname, filename, username=None): """ Edit a file online. """ @@ -1812,7 +1790,6 @@ def edit_file(repo, branchname, filename, username=None): @APP.route('/fork///b//delete', methods=['POST']) @login_required -@repo_method def delete_branch(repo, branchname, username=None): """ Delete the branch of a project. """