Part of lp.code.interfaces.gitrepository View In Hierarchy
Known subclasses: lp.code.interfaces.webservice.IGitRepository
Method | setName | Set the name of the repository to be new_name . |
Method | setOwner | Set the owner of the repository to be new_owner . |
Method | setTarget | Set the target of the repository. |
Method | rescan | Force a rescan of this repository. |
Method | addRule | Add an access rule to this repository. |
Method | moveRule | Move a rule to a new position in its repository's rule order. |
Method | findRuleGrantsByGrantee | Find the grants for a grantee applied to this repository. |
Method | getRules | Get the access rules for this repository. |
Method | setRules | Set the access rules for this repository. |
Method | checkRefPermissions | Check a person's permissions on some references in this repository. |
Method | api_checkRefPermissions | Check a person's permissions on some references in this repository. |
Method | canBeDeleted | Can this repository be deleted in its current state? |
Method | getDeletionRequirements | Determine what is required to delete this branch. |
Method | destroySelf | Delete the specified repository. |
Inherited from IWebhookTarget:
List | valid_webhook_event_types | Valid event types for this object type. |
List | default_webhook_event_types | Default event types for new webhooks attached to this object type. |
Method | newWebhook | Create a new webhook. |
new_name
.new_owner
.This may be helpful in cases where a previous scan crashed.
Parameters | ref_pattern | The reference pattern that the new rule should match. |
creator | The IPerson who is adding the rule. | |
position | The list position at which to insert the rule, or None to append it. |
Parameters | rule | The IGitRule to move. |
position | The new position. For example, 0 puts the rule at
the start, while len(repository.rules) puts the rule at the
end. If the new position is before the end of the list, then
other rules are shifted to later positions to make room. | |
user | The IPerson who is moving the rule. |
Parameters | grantee | The IPerson to search for, or an item of
GitGranteeType other than GitGranteeType.PERSON to search
for some other kind of entity. |
include_transitive | If False, match grantee exactly; if
True (the default), also accept teams of which grantee is a
member. | |
ref_pattern | If not None, only return grants for rules with this ref_pattern. |
Parameters | person | An IPerson to check, or
GitGranteeType.REPOSITORY_OWNER to check an anonymous
repository owner. |
ref_paths | An iterable of reference paths (each of which may be either bytes or text). | |
Returns | A dict mapping reference paths to sets of
GitPermissionType , corresponding to the requested person's
effective permissions on each of the requested references. |
Parameters | person | An IPerson to check. |
paths | An iterable of reference paths. | |
Returns | A dict mapping reference paths to lists of zero or more of "create", "push", and "force-push", indicating the requested person's effective permissions on each of the requested references. |
A repository is considered deletable if it is not linked to any merge proposals.
Parameters | eager_load | If True, preload related information needed to display the deletion requirements. |
Returns | a dict of {object: (operation, reason)}, where object is the object that must be deleted or altered, operation is either "delete" or "alter", and reason is a string explaining why the object needs to be touched. |
Parameters | break_references | If supplied, break any references to this repository by deleting items with mandatory references and NULLing other references. |
Raises | CannotDeleteGitRepository if the repository cannot be deleted. |