repocribro.controllers¶
repocribro.controllers.admin¶
-
repocribro.controllers.admin.account_ban(login)¶ Ban (make inactive) account (POST handler)
-
repocribro.controllers.admin.account_delete(login)¶ Delete account (POST handler)
-
repocribro.controllers.admin.account_detail(login)¶ Account administration (GET handler)
-
repocribro.controllers.admin.admin= <flask.blueprints.Blueprint object>¶ Admin controller blueprint
-
repocribro.controllers.admin.index()¶ Administration zone dashboard (GET handler)
-
repocribro.controllers.admin.repo_delete(login, reponame)¶ Delete repository (POST handler)
-
repocribro.controllers.admin.repo_detail(login, reponame)¶ Repository administration (GET handler)
-
repocribro.controllers.admin.repo_visibility(login, reponame)¶ Change repository visibility (POST handler)
-
repocribro.controllers.admin.role_assignment_add(name)¶ Assign role to user (POST handler)
-
repocribro.controllers.admin.role_assignment_remove(name)¶ Remove assignment of role to user (POST handler)
-
repocribro.controllers.admin.role_create()¶ Create new role (POST handler)
-
repocribro.controllers.admin.role_delete(name)¶ Delete role (POST handler)
-
repocribro.controllers.admin.role_detail(name)¶ Role administration (GET handler)
-
repocribro.controllers.admin.role_edit(name)¶ Edit role (POST handler)
repocribro.controllers.auth¶
-
repocribro.controllers.auth.auth= <flask.blueprints.Blueprint object>¶ Auth controller blueprint
-
repocribro.controllers.auth.github()¶ Redirect to GitHub OAuth gate (GET handler)
-
repocribro.controllers.auth.github_callback()¶ Callback gate for GitHub OAUTH (GET handler)
-
repocribro.controllers.auth.github_callback_get_account(db, gh_api)¶ Processing GitHub callback action
Parameters: - db (
flask_sqlalchemy.SQLAlchemy) – Database for storing GitHub user info - gh_api (
repocribro.github.GitHubAPI) – GitHub API client ready for the communication
Returns: User account and flag if it’s new one
Return type: tuple of
repocribro.models.UserAccount, bool- db (
-
repocribro.controllers.auth.logout()¶ Logout currently logged user (GET handler)
repocribro.controllers.core¶
-
repocribro.controllers.core.core= <flask.blueprints.Blueprint object>¶ Core controller blueprint
-
repocribro.controllers.core.index()¶ Landing page (GET handler)
-
repocribro.controllers.core.org_detail(login)¶ Organization detail (GET handler)
Todo: implement 410 (org deleted/archived/renamed)
-
repocribro.controllers.core.repo_detail(login, reponame)¶ Repo detail (GET handler)
-
repocribro.controllers.core.repo_detail_common(db, ext_master, repo, has_secret=False)¶ Repo detail (for GET handlers)
Todo: implement 410 (repo deleted/archived/renamed)
Hidden repo detail (GET handler)
-
repocribro.controllers.core.repo_redir(login)¶
-
repocribro.controllers.core.search(query='')¶ Search page (GET handler)
Todo: more attrs, limits & pages
-
repocribro.controllers.core.user_detail(login)¶ User detail (GET handler)
Todo: implement 410 (user deleted/archived/renamed)
repocribro.controllers.errors¶
-
repocribro.controllers.errors.err_forbidden(error)¶ Error handler for HTTP 403 - Unauthorized
-
repocribro.controllers.errors.err_gone(error)¶ Error handler for HTTP 410 - Gone
-
repocribro.controllers.errors.err_internal(error)¶ Error handler for HTTP 501 - Not Implemented
-
repocribro.controllers.errors.err_not_found(error)¶ Error handler for HTTP 403 - Not Found
-
repocribro.controllers.errors.errors= <flask.blueprints.Blueprint object>¶ Errors controller blueprint
repocribro.controllers.manage¶
-
repocribro.controllers.manage.dashboard()¶ Management zone dashboard (GET handler)
-
repocribro.controllers.manage.has_good_webhook(gh_api, repo)¶ Check webhook at GitHub for repo
Parameters: - gh_api (
repocribro.github.GitHubAPI) – GitHub API client for communication - repo (
repocribro.models.Repository) – Repository which webhook should be checked
Returns: If webhook is already in good shape
Return type: bool
Todo: move somewhere else, check registered events
- gh_api (
-
repocribro.controllers.manage.manage= <flask.blueprints.Blueprint object>¶ Manage controller blueprint
-
repocribro.controllers.manage.organizations()¶ List user organizations from GitHub (GET handler)
-
repocribro.controllers.manage.repo_activate(reponame)¶ Activate repo in app from GitHub (POST handler)
Todo: protect from activating too often
-
repocribro.controllers.manage.repo_deactivate(reponame)¶ Deactivate repo in app from GitHub (POST handler)
-
repocribro.controllers.manage.repo_delete()¶ Delete repo (in app) from GitHub (POST handler)
-
repocribro.controllers.manage.repo_detail(reponame)¶ Repository detail (GET handler)
-
repocribro.controllers.manage.repo_update(reponame)¶ Update repo info from GitHub (GET handler)
Todo: protect from updating too often
-
repocribro.controllers.manage.repositories()¶ List user repositories from GitHub (GET handler)
-
repocribro.controllers.manage.update_profile()¶ Update user info from GitHub (GET handler)
Todo: protect from updating too often
-
repocribro.controllers.manage.update_webhook(gh_api, repo)¶ Update webhook at GitHub for repo if needed
Parameters: - gh_api (
repocribro.github.GitHubAPI) – GitHub API client for communication - repo (
repocribro.models.Repository) – Repository which webhook should be updated
Returns: If webhook is now in good shape
Return type: bool
Todo: move somewhere else
- gh_api (