prometa.git.gitlab.hooks package

Submodules

prometa.git.gitlab.hooks.hook_manager module

Base class for each hook manager.

class prometa.git.gitlab.hooks.hook_manager.HookManager(gitlab_api)[source]

Bases: Registrable

Registrable base class for each Hook manager.

NAME = None[source]
__init__(gitlab_api)[source]
Parameters:

gitlab_ci – A GitLabCI instance.

property enabled[source]

The hook’s name is in the gitlab.enabled_hooks list in the configuration file.

property gitlab_project[source]

The python-gitlab Project instance.

manage()[source]

Manage this badge. This should be overridden in subclasses.

property project[source]

The Project instance.

prometa.git.gitlab.hooks.software_heritage module

Software Heritage hook.

class prometa.git.gitlab.hooks.software_heritage.SoftwareHeritageHookManager(gitlab_api)[source]

Bases: HookManager

Hook to prompt Software Heritage to archive the project when it is updated.

NAME = 'Software Heritage'[source]
manage()[source]

Manage this badge. This should be overridden in subclasses.

Module contents

Manage project hooks on GitLab.

class prometa.git.gitlab.hooks.GitLabHooksMixin[source]

Bases: object

Mixin to handle hooks in GitLabApi class.

get_hook_manager(name)[source]

Get an instance of the named HookManager subclass.

manage_hooks()[source]

Manage configured hooks.

class prometa.git.gitlab.hooks.HookManager(gitlab_api)[source]

Bases: Registrable

Registrable base class for each Hook manager.

NAME = None[source]
__init__(gitlab_api)[source]
Parameters:

gitlab_ci – A GitLabCI instance.

property enabled[source]

The hook’s name is in the gitlab.enabled_hooks list in the configuration file.

property gitlab_project[source]

The python-gitlab Project instance.

manage()[source]

Manage this badge. This should be overridden in subclasses.

property project[source]

The Project instance.