views

HTTP Views (accepts and parses webhooks)

Functions

add_to_navbar(title)

Decorator adding a view to the navigation bar

auth_github(request)

View for signing in with Github

check_permission(request, permission[, context])

Checks permissions

generic_circleci_dispatch(request)

View for incoming webhooks from CircleCI

generic_webhook_dispatch(request)

View for all other incoming webhooks

github_webhook_dispatch(request)

View for incoming webhooks from Github

list_commands(request)

Self documents available commands

login(request)

View for login page

logout(request)

View for logging out user

show_index(_request)

View for the Bot’s home page.

show_status(request)

View for checking in on the bots status

Documentation

bioconda_utils.bot.views.add_to_navbar(title)[source]

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 with event_routes.

async bioconda_utils.bot.views.list_commands(request)[source]

Self documents available commands

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.

bioconda_utils.bot.views.navigation_bar = [('/', 'home', 'Home'), ('/status', 'status', 'Status'), ('/commands', 'commands', 'Commands')]

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