def api(): ''' Display the api information page. ''' api_git_tags_doc = load_doc(project.api_git_tags) api_projects_doc = load_doc(project.api_projects) issues = [] if pagure.APP.config.get('ENABLE_TICKETS', True): issues.append(load_doc(issue.api_new_issue)) issues.append(load_doc(issue.api_view_issues)) issues.append(load_doc(issue.api_view_issue)) issues.append(load_doc(issue.api_view_issue_comment)) issues.append(load_doc(issue.api_comment_issue)) api_pull_request_views_doc = load_doc(fork.api_pull_request_views) api_pull_request_view_doc = load_doc(fork.api_pull_request_view) api_pull_request_merge_doc = load_doc(fork.api_pull_request_merge) api_pull_request_close_doc = load_doc(fork.api_pull_request_close) api_pull_request_add_comment_doc = load_doc( fork.api_pull_request_add_comment) api_pull_request_add_flag_doc = load_doc(fork.api_pull_request_add_flag) api_version_doc = load_doc(api_version) api_users_doc = load_doc(api_users) api_view_user_doc = load_doc(user.api_view_user) if pagure.APP.config.get('ENABLE_TICKETS', True): api_project_tags_doc = load_doc(api_project_tags) api_groups_doc = load_doc(api_groups) api_error_codes_doc = load_doc(api_error_codes) extras = [ api_version_doc, api_error_codes_doc, ] if pagure.APP.config.get('ENABLE_TICKETS', True): extras.append(api_project_tags_doc) return flask.render_template( 'api.html', version=__api_version__.split('.'), api_doc=APIDOC, projects=[ api_git_tags_doc, api_projects_doc, ], issues=issues, requests=[ api_pull_request_views_doc, api_pull_request_view_doc, api_pull_request_merge_doc, api_pull_request_close_doc, api_pull_request_add_comment_doc, api_pull_request_add_flag_doc, ], users=[ api_users_doc, api_view_user_doc, api_groups_doc, ], extras=extras, )
def api(): """ Display the api information page. """ api_project_doc = load_doc(project.api_project) api_projects_doc = load_doc(project.api_projects) api_project_watchers_doc = load_doc(project.api_project_watchers) api_git_tags_doc = load_doc(project.api_git_tags) api_project_git_urls_doc = load_doc(project.api_project_git_urls) api_git_branches_doc = load_doc(project.api_git_branches) api_new_project_doc = load_doc(project.api_new_project) api_modify_project_doc = load_doc(project.api_modify_project) api_fork_project_doc = load_doc(project.api_fork_project) api_modify_acls_doc = load_doc(project.api_modify_acls) api_generate_acls_doc = load_doc(project.api_generate_acls) api_new_branch_doc = load_doc(project.api_new_branch) api_commit_flags_doc = load_doc(project.api_commit_flags) api_commit_add_flag_doc = load_doc(project.api_commit_add_flag) api_update_project_watchers_doc = load_doc( project.api_update_project_watchers) api_get_project_options_doc = load_doc(project.api_get_project_options) api_modify_project_options_doc = load_doc( project.api_modify_project_options) issues = [] if pagure_config.get("ENABLE_TICKETS", True): issues.append(load_doc(issue.api_new_issue)) issues.append(load_doc(issue.api_view_issues)) issues.append(load_doc(issue.api_view_issue)) issues.append(load_doc(issue.api_view_issue_comment)) issues.append(load_doc(issue.api_comment_issue)) issues.append(load_doc(issue.api_update_custom_field)) issues.append(load_doc(issue.api_update_custom_fields)) issues.append(load_doc(issue.api_change_status_issue)) issues.append(load_doc(issue.api_change_milestone_issue)) issues.append(load_doc(issue.api_assign_issue)) issues.append(load_doc(issue.api_subscribe_issue)) issues.append(load_doc(user.api_view_user_issues)) ci_doc = [] if pagure_config.get("PAGURE_CI_SERVICES", False): if "jenkins" in pagure_config["PAGURE_CI_SERVICES"]: ci_doc.append(load_doc(jenkins.jenkins_ci_notification)) api_pull_request_create_doc = load_doc(fork.api_pull_request_create) api_pull_request_views_doc = load_doc(fork.api_pull_request_views) api_pull_request_view_doc = load_doc(fork.api_pull_request_view) api_pull_request_diffstats_doc = load_doc(fork.api_pull_request_diffstats) api_pull_request_by_uid_view_doc = load_doc( fork.api_pull_request_by_uid_view) api_pull_request_merge_doc = load_doc(fork.api_pull_request_merge) api_pull_request_rebase_doc = load_doc(fork.api_pull_request_rebase) api_pull_request_close_doc = load_doc(fork.api_pull_request_close) api_pull_request_add_comment_doc = load_doc( fork.api_pull_request_add_comment) api_pull_request_add_flag_doc = load_doc(fork.api_pull_request_add_flag) api_version_doc = load_doc(api_version) api_whoami_doc = load_doc(api_whoami) api_users_doc = load_doc(api_users) api_view_user_doc = load_doc(user.api_view_user) api_view_user_activity_stats_doc = load_doc( user.api_view_user_activity_stats) api_view_user_activity_date_doc = load_doc( user.api_view_user_activity_date) api_view_user_requests_filed_doc = load_doc( user.api_view_user_requests_filed) api_view_user_requests_actionable_doc = load_doc( user.api_view_user_requests_actionable) api_view_group_doc = load_doc(group.api_view_group) api_groups_doc = load_doc(group.api_groups) if pagure_config.get("ENABLE_TICKETS", True): api_project_tags_doc = load_doc(api_project_tags) api_error_codes_doc = load_doc(api_error_codes) extras = [api_whoami_doc, api_version_doc, api_error_codes_doc] if pagure_config.get("ENABLE_TICKETS", True): extras.append(api_project_tags_doc) return flask.render_template( "api.html", version=pagure.__api_version__, api_doc=APIDOC, projects=[ api_new_project_doc, api_modify_project_doc, api_project_doc, api_projects_doc, api_git_tags_doc, api_project_git_urls_doc, api_project_watchers_doc, api_git_branches_doc, api_fork_project_doc, api_modify_acls_doc, api_generate_acls_doc, api_new_branch_doc, api_commit_flags_doc, api_commit_add_flag_doc, api_update_project_watchers_doc, api_get_project_options_doc, api_modify_project_options_doc, ], issues=issues, requests=[ api_pull_request_create_doc, api_pull_request_views_doc, api_pull_request_view_doc, api_pull_request_diffstats_doc, api_pull_request_by_uid_view_doc, api_pull_request_merge_doc, api_pull_request_rebase_doc, api_pull_request_close_doc, api_pull_request_add_comment_doc, api_pull_request_add_flag_doc, ], users=[ api_users_doc, api_view_user_doc, api_view_user_activity_stats_doc, api_view_user_activity_date_doc, api_view_user_requests_filed_doc, api_view_user_requests_actionable_doc, ], groups=[api_groups_doc, api_view_group_doc], ci=ci_doc, extras=extras, )
def api(): ''' Display the api information page. ''' api_git_tags_doc = load_doc(project.api_git_tags) api_new_issue_doc = load_doc(issue.api_new_issue) api_view_issues_doc = load_doc(issue.api_view_issues) api_pull_request_views_doc = load_doc(fork.api_pull_request_views) api_pull_request_view_doc = load_doc(fork.api_pull_request_view) api_pull_request_merge_doc = load_doc(fork.api_pull_request_merge) api_pull_request_close_doc = load_doc(fork.api_pull_request_close) api_pull_request_add_comment_doc = load_doc( fork.api_pull_request_add_comment) api_pull_request_add_flag_doc = load_doc(fork.api_pull_request_add_flag) api_version_doc = load_doc(api_version) api_users_doc = load_doc(api_users) api_project_tags_doc = load_doc(api_project_tags) api_groups_doc = load_doc(api_groups) api_error_codes_doc = load_doc(api_error_codes) return flask.render_template( 'api.html', projects=[ api_git_tags_doc, api_new_issue_doc, api_view_issues_doc, api_pull_request_views_doc, api_pull_request_view_doc, api_pull_request_merge_doc, api_pull_request_close_doc, api_pull_request_add_comment_doc, api_pull_request_add_flag_doc, ], users=[ api_users_doc, api_groups_doc, ], extras=[ api_version_doc, api_project_tags_doc, api_error_codes_doc, ], )
def api(): ''' Display the api information page. ''' api_git_tags_doc = load_doc(project.api_git_tags) api_projects_doc = load_doc(project.api_projects) api_new_issue_doc = load_doc(issue.api_new_issue) api_view_issue_doc = load_doc(issue.api_view_issue) api_view_issue_comment_doc = load_doc(issue.api_view_issue_comment) api_view_issues_doc = load_doc(issue.api_view_issues) api_issue_add_comment_doc = load_doc(issue.api_comment_issue) api_pull_request_views_doc = load_doc(fork.api_pull_request_views) api_pull_request_view_doc = load_doc(fork.api_pull_request_view) api_pull_request_merge_doc = load_doc(fork.api_pull_request_merge) api_pull_request_close_doc = load_doc(fork.api_pull_request_close) api_pull_request_add_comment_doc = load_doc( fork.api_pull_request_add_comment) api_pull_request_add_flag_doc = load_doc(fork.api_pull_request_add_flag) api_version_doc = load_doc(api_version) api_users_doc = load_doc(api_users) api_view_user_doc = load_doc(user.api_view_user) api_project_tags_doc = load_doc(api_project_tags) api_groups_doc = load_doc(api_groups) api_error_codes_doc = load_doc(api_error_codes) return flask.render_template( 'api.html', api_doc=APIDOC, projects=[ api_git_tags_doc, api_projects_doc, ], issues=[ api_new_issue_doc, api_view_issues_doc, api_view_issue_doc, api_view_issue_comment_doc, api_issue_add_comment_doc, ], requests=[ api_pull_request_views_doc, api_pull_request_view_doc, api_pull_request_merge_doc, api_pull_request_close_doc, api_pull_request_add_comment_doc, api_pull_request_add_flag_doc, ], users=[ api_users_doc, api_view_user_doc, api_groups_doc, ], extras=[ api_version_doc, api_project_tags_doc, api_error_codes_doc, ], )
def api(): """ Display the api information page. """ api_project_doc = load_doc(project.api_project) api_projects_doc = load_doc(project.api_projects) api_project_watchers_doc = load_doc(project.api_project_watchers) api_git_tags_doc = load_doc(project.api_git_tags) api_project_git_urls_doc = load_doc(project.api_project_git_urls) api_git_branches_doc = load_doc(project.api_git_branches) api_new_project_doc = load_doc(project.api_new_project) api_modify_project_doc = load_doc(project.api_modify_project) api_fork_project_doc = load_doc(project.api_fork_project) api_modify_acls_doc = load_doc(project.api_modify_acls) api_generate_acls_doc = load_doc(project.api_generate_acls) api_new_branch_doc = load_doc(project.api_new_branch) api_commit_flags_doc = load_doc(project.api_commit_flags) api_commit_add_flag_doc = load_doc(project.api_commit_add_flag) api_update_project_watchers_doc = load_doc( project.api_update_project_watchers ) api_get_project_options_doc = load_doc(project.api_get_project_options) api_modify_project_options_doc = load_doc( project.api_modify_project_options ) api_project_block_user_doc = load_doc(project.api_project_block_user) issues = [] if pagure_config.get("ENABLE_TICKETS", True): issues.append(load_doc(issue.api_new_issue)) issues.append(load_doc(issue.api_view_issues)) issues.append(load_doc(issue.api_view_issue)) issues.append(load_doc(issue.api_view_issue_comment)) issues.append(load_doc(issue.api_comment_issue)) issues.append(load_doc(issue.api_update_custom_field)) issues.append(load_doc(issue.api_update_custom_fields)) issues.append(load_doc(issue.api_change_status_issue)) issues.append(load_doc(issue.api_change_milestone_issue)) issues.append(load_doc(issue.api_assign_issue)) issues.append(load_doc(issue.api_subscribe_issue)) issues.append(load_doc(user.api_view_user_issues)) ci_doc = [] if pagure_config.get("PAGURE_CI_SERVICES", False): if "jenkins" in pagure_config["PAGURE_CI_SERVICES"]: ci_doc.append(load_doc(jenkins.jenkins_ci_notification)) api_pull_request_create_doc = load_doc(fork.api_pull_request_create) api_pull_request_views_doc = load_doc(fork.api_pull_request_views) api_pull_request_view_doc = load_doc(fork.api_pull_request_view) api_pull_request_diffstats_doc = load_doc(fork.api_pull_request_diffstats) api_pull_request_by_uid_view_doc = load_doc( fork.api_pull_request_by_uid_view ) api_pull_request_merge_doc = load_doc(fork.api_pull_request_merge) api_pull_request_rebase_doc = load_doc(fork.api_pull_request_rebase) api_pull_request_close_doc = load_doc(fork.api_pull_request_close) api_pull_request_add_comment_doc = load_doc( fork.api_pull_request_add_comment ) api_pull_request_add_flag_doc = load_doc(fork.api_pull_request_add_flag) api_pull_request_assign_doc = load_doc(fork.api_pull_request_assign) api_pull_request_update_doc = load_doc(fork.api_pull_request_update) api_version_doc = load_doc(api_version) api_whoami_doc = load_doc(api_whoami) api_users_doc = load_doc(api_users) api_view_user_doc = load_doc(user.api_view_user) api_view_user_activity_stats_doc = load_doc( user.api_view_user_activity_stats ) api_view_user_activity_date_doc = load_doc( user.api_view_user_activity_date ) api_view_user_requests_filed_doc = load_doc( user.api_view_user_requests_filed ) api_view_user_requests_actionable_doc = load_doc( user.api_view_user_requests_actionable ) api_view_group_doc = load_doc(group.api_view_group) api_groups_doc = load_doc(group.api_groups) if pagure_config.get("ENABLE_TICKETS", True): api_project_tags_doc = load_doc(api_project_tags) api_error_codes_doc = load_doc(api_error_codes) extras = [api_whoami_doc, api_version_doc, api_error_codes_doc] if pagure_config.get("ENABLE_TICKETS", True): extras.append(api_project_tags_doc) return flask.render_template( "api.html", version=pagure.__api_version__, api_doc=APIDOC, projects=[ api_new_project_doc, api_modify_project_doc, api_project_doc, api_projects_doc, api_git_tags_doc, api_project_git_urls_doc, api_project_watchers_doc, api_git_branches_doc, api_fork_project_doc, api_modify_acls_doc, api_generate_acls_doc, api_new_branch_doc, api_commit_flags_doc, api_commit_add_flag_doc, api_update_project_watchers_doc, api_get_project_options_doc, api_modify_project_options_doc, api_project_block_user_doc, ], issues=issues, requests=[ api_pull_request_create_doc, api_pull_request_views_doc, api_pull_request_view_doc, api_pull_request_diffstats_doc, api_pull_request_by_uid_view_doc, api_pull_request_merge_doc, api_pull_request_rebase_doc, api_pull_request_close_doc, api_pull_request_add_comment_doc, api_pull_request_add_flag_doc, api_pull_request_assign_doc, api_pull_request_update_doc, ], users=[ api_users_doc, api_view_user_doc, api_view_user_activity_stats_doc, api_view_user_activity_date_doc, api_view_user_requests_filed_doc, api_view_user_requests_actionable_doc, ], groups=[api_groups_doc, api_view_group_doc], ci=ci_doc, extras=extras, )