views¶
HTTP Views (accepts and parses webhooks)
Functions
|
Decorator adding a view to the navigation bar |
|
View for signing in with Github |
|
Checks permissions |
|
View for incoming webhooks from CircleCI |
|
View for all other incoming webhooks |
|
View for incoming webhooks from Github |
|
Self documents available commands |
|
View for login page |
|
View for logging out user |
|
View for the Bot’s home page. |
|
View for checking in on the bots status |
Documentation
Decorator adding a view to the navigation bar
Must be “above” the
@web_routes
decorator.- Parameters
title – Title to register for this page. Will be the HTML title and the name in the navbar.
-
async
bioconda_utils.bot.views.
auth_github
(request)[source]¶ View for signing in with Github
Currently the only authentication method (and probably will remain so).
This will redirect to Github to allow OAUTH authentication if necessary.
-
async
bioconda_utils.bot.views.
check_permission
(request, permission, context=None)[source]¶ Checks permissions
Custom implementation replacing aiohttp-security one. This one adds the requested permissions to the request so they can be presented in the error handler.
- Raises
HTTPForbidden –
-
async
bioconda_utils.bot.views.
generic_circleci_dispatch
(request)[source]¶ View for incoming webhooks from CircleCI
These are actually slack messages. We try to deparse them, but nothing is implemented on acting upon them yet.
-
async
bioconda_utils.bot.views.
generic_webhook_dispatch
(request)[source]¶ View for all other incoming webhooks
This is just for debugging, so we can see what we would be receiving
-
async
bioconda_utils.bot.views.
github_webhook_dispatch
(request)[source]¶ View for incoming webhooks from Github
Here, webhooks (events) from Github are accepted and dispatched to the event handlers defined in
events
module and registered withevent_routes
.
-
async
bioconda_utils.bot.views.
login
(request)[source]¶ View for login page
Redirects to
/auth/github
in all cases - no other login methods supported.
-
async
bioconda_utils.bot.views.
logout
(request)[source]¶ View for logging out user
Accepts a next parameter in the URL. This is where the user is sent back to (via HTTP redirect) after logging out.
List of navigation bar entries defined by this module
-
async
bioconda_utils.bot.views.
show_index
(_request)[source]¶ View for the Bot’s home page.
Renders nothing special at the moment, just the template.
-
async
bioconda_utils.bot.views.
show_status
(request)[source]¶ View for checking in on the bots status
Shows the status of each responsding worker. This page may take 100ms extra to render. If workers are busy, they may not respons within that time.
-
bioconda_utils.bot.views.
web_routes
= <RouteTableDef count=9>¶ List of routes from url path to handler defined in this module