commands

Handlers for user commmands (@biocondabot do this)

Functions

command_autobump(ghapi, _issue_number, …)

Run immediate Autobump on recipes

command_bump(ghapi, issue_number, _user, *_args)

Bump the build number of a recipe

command_hello(ghapi, issue_number, user, *_args)

Check whether the bot is listening.

command_lint(ghapi, issue_number, _user, *_args)

Lint the current recipe

command_merge(ghapi, issue_number, user, *_args)

Merge PR

command_rebuild(ghapi, issue_number, _user, …)

Trigger rebuild of PR as of latest sha

command_recheck(ghapi, issue_number, _user, …)

Trigger check_check_run and check_circle_artifacts

command_schedule(ghapi, issue_number, user, …)

Schedule autobump on CircleCI

command_update(ghapi, issue_number, user, *args)

Update PR branch with it’s target branch (“base”)

permissions([member, author, team])

Decorator for commands checking for permissions

Classes

CommandDispatch()

Decorator based router handling bot commands

Documentation

class bioconda_utils.bot.commands.CommandDispatch[source]

Bases: object

Decorator based router handling bot commands

>>> @command_routes.register("hello")
>>> def command_hello(event, ghapi, *args):
>>>     logger.info("Got command 'hello %s'", " ".join(args))
async dispatch(cmd, *args, **kwargs)[source]

Calls one of the registered functions

register(cmd, description=None)[source]

Decorator adding decorated function to dispatcher

Return type

Callable[[Callable], Callable]

async bioconda_utils.bot.commands.command_autobump(ghapi, _issue_number, _user, *args)[source]

Run immediate Autobump on recipes

async bioconda_utils.bot.commands.command_bump(ghapi, issue_number, _user, *_args)[source]

Bump the build number of a recipe

async bioconda_utils.bot.commands.command_hello(ghapi, issue_number, user, *_args)[source]

Check whether the bot is listening. If it is, it will answer.

This command exists purely for the purpose of testing.

async bioconda_utils.bot.commands.command_lint(ghapi, issue_number, _user, *_args)[source]

Lint the current recipe

async bioconda_utils.bot.commands.command_merge(ghapi, issue_number, user, *_args)[source]

Merge PR

async bioconda_utils.bot.commands.command_rebuild(ghapi, issue_number, _user, *_args)[source]

Trigger rebuild of PR as of latest sha

async bioconda_utils.bot.commands.command_recheck(ghapi, issue_number, _user, *_args)[source]

Trigger check_check_run and check_circle_artifacts

async bioconda_utils.bot.commands.command_schedule(ghapi, issue_number, user, *args)[source]

Schedule autobump on CircleCI

Takes the maximum number of recipes to update as optional argument.

async bioconda_utils.bot.commands.command_update(ghapi, issue_number, user, *args)[source]

Update PR branch with it’s target branch (“base”)

bioconda_utils.bot.commands.permissions(member=None, author=None, team=None)[source]

Decorator for commands checking for permissions

Permissions are OR combined. Repeat the decorator to get AND.

Parameters
  • member (Optional[bool]) – if true, user must be organization member

  • author (Optional[bool]) – if true, user must be author, if false user must not be author