l.c.i.g.IGitNamespacePolicy(Interface) : interface documentation

Part of lp.code.interfaces.gitnamespace View In Hierarchy

Methods relating to Git repository creation and validation.
Attribute has_defaults True iff the target of this namespace may have a default repository.
Attribute allow_push_to_set_default True iff this namespace permits automatically setting a default repository on push.
Attribute supports_merge_proposals Does this namespace support merge proposals at all?
Attribute supports_code_imports Does this namespace support code imports at all?
Attribute allow_recipe_name_from_target Can recipe names reasonably be generated from the target name rather than the branch name?
Method canCreateRepositories Is the user allowed to create repositories for this namespace?
Method getAllowedInformationTypes Get the information types that a repository in this namespace can
Method getDefaultInformationType Get the default information type for repositories in this namespace.
Method validateRegistrant Check that the registrant can create a repository in this namespace.
Method validateRepositoryName Check the repository name.
Method validateDefaultFlags Check that any default flags on 'repository' fit this namespace.
Method validateMove Check that 'mover' can move 'repository' into this namespace.
Method areRepositoriesMergeable Is other mergeable into this?
Attribute collection An IGitCollection for this namespace.
Method assignKarma Assign karma to the person on the appropriate target.
has_defaults =
True iff the target of this namespace may have a default repository.
allow_push_to_set_default =
True iff this namespace permits automatically setting a default repository on push.
supports_merge_proposals =
Does this namespace support merge proposals at all?
supports_code_imports =
Does this namespace support code imports at all?
allow_recipe_name_from_target =
Can recipe names reasonably be generated from the target name rather than the branch name?
def canCreateRepositories(user):
Is the user allowed to create repositories for this namespace?
ParametersuserAn IPerson.
ReturnsA Boolean value.
def getAllowedInformationTypes(who):
Get the information types that a repository in this namespace can
have.

:param who: The user making the request.
:return: A sequence of `InformationType`s.
def getDefaultInformationType(who):
Get the default information type for repositories in this namespace.
ParameterswhoThe user to return the information type for.
ReturnsAn InformationType.
def validateRegistrant(registrant, repository=None):
Check that the registrant can create a repository in this namespace.
ParametersregistrantAn IPerson.
repositoryAn optional IGitRepository to also check when working with imported repositories.
RaisesGitRepositoryCreatorNotMemberOfOwnerTeamif the namespace owner is a team and the registrant is not in that team.
GitRepositoryCreatorNotOwnerif the namespace owner is an individual and the registrant is not the owner.
GitRepositoryCreationForbiddenif the registrant is not allowed to create a repository in this namespace due to privacy rules.
def validateRepositoryName(name):
Check the repository name.
ParametersnameA branch name, either string or unicode.
RaisesGitRepositoryExistsif a branch with the name already exists in the namespace.
LaunchpadValidationErrorif the name doesn't match the validation constraints on IGitRepository.name.
def validateDefaultFlags(repository):
Check that any default flags on 'repository' fit this namespace.
ParametersrepositoryAn IGitRepository to check.
RaisesGitDefaultConflictIf the repository has the target_default flag set but this namespace already has a target default, or if the repository has the owner_default flag set but this namespace already has an owner-target default.
def validateMove(repository, mover, name=None):
Check that 'mover' can move 'repository' into this namespace.
ParametersrepositoryAn IGitRepository that might be moved.
moverThe IPerson who would move it.
nameA new name for the repository. If None, the repository name is used.
RaisesGitRepositoryCreatorNotMemberOfOwnerTeamif the namespace owner is a team and 'mover' is not in that team.
GitRepositoryCreatorNotOwnerif the namespace owner is an individual and 'mover' is not the owner.
GitRepositoryCreationForbiddenif 'mover' is not allowed to create a repository in this namespace due to privacy rules.
GitRepositoryExistsif a repository with the new name already exists in the namespace.
def areRepositoriesMergeable(this, other):
Is other mergeable into this?
ParametersthisAn IGitRepository in this namespace.
otherAn IGitRepository in either this or another namespace.
collection =
An IGitCollection for this namespace.
def assignKarma(person, action_name, date_created=None):
Assign karma to the person on the appropriate target.
API Documentation for Launchpad, generated by pydoctor at 2020-02-19 00:00:13.