settings module

The settings module of GitLab Guard.

class confirm.gitlab_guard.settings.Settings(project, defaults, overrides, fix)

The class which does all the heavy load to compare the expected, with the current project settings.

Parameters:
  • project (gitlab.v4.objects.projects.Project) – The project

  • defaults (dict) – The default settings

  • overrides (dict) – The project overrrides

  • fix (bool) – Fix violations automatically

property expected_settings

The expected settings.

Returns:

The expected settings

Return type:

dict

get_current_settings(settings)

Retreive the current settings of a project.

Parameters:

settings (iterable) – The settings to get

Returns:

The current settings

Return type:

dict

verify()

Verify the settings.

Raises:

UpdateError – When project couldn’t be updated

Returns:

Violations

Return type:

int