gitlab.v4 package¶
Submodules¶
gitlab.v4.objects module¶
- class gitlab.v4.objects.Any(*args, **kwargs)¶
Bases:
objectSpecial type indicating an unconstrained type.
Any is compatible with every type.
Any assumed to have all methods.
All values assumed to be instances of Any.
Note that all the above statements are true from the point of view of static type checkers. At runtime, Any should not be used with instance checks.
- class gitlab.v4.objects.Application(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ApplicationAppearance(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ApplicationAppearanceManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ApplicationAppearance],UpdateMixin[ApplicationAppearance]Object Creation
Object update
Optional attributes for object update:
titledescriptionlogoheader_logofaviconnew_project_guidelinesheader_messagefooter_messagemessage_background_colormessage_font_coloremail_header_and_footer_enabled
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- update(id: str | int | None = None, new_data: dict[str, Any] | None = None, **kwargs: Any) dict[str, Any]¶
Update an object on the server.
- Parameters:
- Returns:
The new object data (not a RESTObject)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
- Return type:
dict[str, Any]
- class gitlab.v4.objects.ApplicationManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[Application],CreateMixin[Application],DeleteMixin[Application]Object Creation
Required attributes for object create:
nameredirect_uriscopes
Optional attributes for object create:
confidential
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ApplicationSettings(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ApplicationSettingsManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ApplicationSettings],UpdateMixin[ApplicationSettings]Object Creation
Object update
Optional attributes for object update:
iddefault_projects_limitsignup_enabledsilent_mode_enabledpassword_authentication_enabled_for_webgravatar_enabledsign_in_textcreated_atupdated_athome_page_urldefault_branch_protectionrestricted_visibility_levelsmax_attachment_sizesession_expire_delaydefault_project_visibilitydefault_snippet_visibilitydefault_group_visibilityoutbound_local_requests_whitelistdisabled_oauth_sign_in_sourcesdomain_whitelistdomain_blacklist_enableddomain_blacklistdomain_allowlistdomain_denylist_enableddomain_denylistexternal_authorization_service_enabledexternal_authorization_service_urlexternal_authorization_service_default_labelexternal_authorization_service_timeoutimport_sourcesuser_oauth_applicationsafter_sign_out_pathcontainer_registry_token_expire_delayrepository_storagesplantuml_enabledplantuml_urlterminal_max_session_timepolling_interval_multiplierrsa_key_restrictiondsa_key_restrictionecdsa_key_restrictioned25519_key_restrictionfirst_day_of_weekenforce_termstermsperformance_bar_allowed_group_idinstance_statistics_visibility_privateuser_show_add_ssh_key_messagefile_template_project_idlocal_markdown_versionasset_proxy_enabledasset_proxy_urlasset_proxy_whitelistasset_proxy_allowlistgeo_node_allowed_ipsallow_local_requests_from_hooks_and_servicesallow_local_requests_from_web_hooks_and_servicesallow_local_requests_from_system_hooks
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- update(id: str | int | None = None, new_data: dict[str, Any] | None = None, **kwargs: Any) dict[str, Any]¶
Update an object on the server.
- Parameters:
- Returns:
The new object data (not a RESTObject)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
- Return type:
dict[str, Any]
- class gitlab.v4.objects.ApplicationStatistics(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ApplicationStatisticsManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ApplicationStatistics]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.AuditEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.AuditEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[AuditEvent]Object listing filters
created_aftercreated_beforeentity_typeentity_id
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.BroadcastMessage(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.BroadcastMessageManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[BroadcastMessage]Object Creation
Required attributes for object create:
message
Optional attributes for object create:
starts_atends_atcolorfonttarget_access_levels
Object update
Optional attributes for object update:
messagestarts_atends_atcolorfonttarget_access_levels
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.BulkImport(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- entities: BulkImportEntityManager¶
- class gitlab.v4.objects.BulkImportAllEntity(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.BulkImportAllEntityManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[BulkImportAllEntity]Object listing filters
sortstatus
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.BulkImportEntity(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.BulkImportEntityManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[BulkImportEntity]Object listing filters
sortstatus
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.BulkImportManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[BulkImport],RetrieveMixin[BulkImport]Object listing filters
sortstatus
Object Creation
Required attributes for object create:
configurationentities
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.CiLint(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.CiLintManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[CiLint]Object Creation
Required attributes for object create:
content
Optional attributes for object create:
include_merged_yamlinclude_jobs
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.CurrentUser(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- emails: CurrentUserEmailManager¶
- gpgkeys: CurrentUserGPGKeyManager¶
- keys: CurrentUserKeyManager¶
- runners: CurrentUserRunnerManager¶
- status: CurrentUserStatusManager¶
- class gitlab.v4.objects.CurrentUserEmail(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.CurrentUserEmailManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[CurrentUserEmail],CreateMixin[CurrentUserEmail],DeleteMixin[CurrentUserEmail]Object Creation
Required attributes for object create:
email
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.CurrentUserGPGKey(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.CurrentUserGPGKeyManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[CurrentUserGPGKey],CreateMixin[CurrentUserGPGKey],DeleteMixin[CurrentUserGPGKey]Object Creation
Required attributes for object create:
key
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.CurrentUserKey(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.CurrentUserKeyManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[CurrentUserKey],CreateMixin[CurrentUserKey],DeleteMixin[CurrentUserKey]Object Creation
Required attributes for object create:
titlekey
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.CurrentUserManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[CurrentUser]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.CurrentUserRunner(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.CurrentUserRunnerManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[CurrentUserRunner]Object Creation
Required attributes for object create:
runner_type
Optional attributes for object create:
group_idproject_iddescriptionpausedlockedrun_untaggedtag_listaccess_levelmaximum_timeoutmaintenance_note
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.CurrentUserStatus(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.CurrentUserStatusManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[CurrentUserStatus],UpdateMixin[CurrentUserStatus]Object Creation
Object update
Optional attributes for object update:
emojimessage
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.DeployKey(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.DeployKeyManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[DeployKey],ListMixin[DeployKey]Object Creation
Required attributes for object create:
titlekey
Optional attributes for object create:
expires_at
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.DeployToken(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.DeployTokenManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[DeployToken]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.Dockerfile(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.DockerfileManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[Dockerfile]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.Event(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.EventManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object listing filters
actiontarget_typebeforeaftersortscope
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.Feature(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.FeatureManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[Feature],DeleteMixin[Feature]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- set(name: str, value: bool | int, feature_group: str | None = None, user: str | None = None, group: str | None = None, project: str | None = None, **kwargs: Any) Feature¶
Create or update the object.
- Parameters:
name (str) – The value to set for the object
value (bool | int) – The value to set for the object
feature_group (str | None) – A feature group name
user (str | None) – A GitLab username
group (str | None) – A GitLab group
project (str | None) – A GitLab project in form group/project
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabSetError – If an error occurred
- Returns:
The created/updated attribute
- Return type:
- class gitlab.v4.objects.GenericPackage(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GenericPackageManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RESTManager[GenericPackage]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- download(package_name: str, package_version: str, file_name: str, streamed: bool = False, action: Callable[[bytes], Any] | None = None, chunk_size: int = 1024, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Download a generic package.
- Parameters:
package_name (str) – The package name.
package_version (str) – The package version.
file_name (str) – The name of the file in the registry
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
iterator (bool) – If True directly return the underlying response iterator
action (Callable[[bytes], Any] | None) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The package content if streamed is False, None otherwise
- Return type:
bytes | Iterator[Any] | None
- upload(package_name: str, package_version: str, file_name: str, path: str | Path | None = None, select: str | None = None, data: bytes | BinaryIO | None = None, **kwargs: Any) GenericPackage¶
Upload a file as a generic package.
- Parameters:
package_name (str) – The package name. Must follow generic package name regex rules
package_version (str) – The package version. Must follow semantic version regex rules
file_name (str) – The name of the file as uploaded in the registry
path (str | Path | None) – The path to a local file to upload
select (str | None) – GitLab API accepts a value of ‘package_file’
data (bytes | BinaryIO | None)
kwargs (Any)
- Raises:
GitlabConnectionError – If the server cannot be reached
GitlabUploadError – If the file upload fails
GitlabUploadError – If
pathcannot be readGitlabUploadError – If both
pathanddataare passed
- Returns:
An object storing the metadata of the uploaded package.
- Return type:
- class gitlab.v4.objects.GeoNode(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- repair(**kwargs: Any) None¶
Repair the OAuth authentication of the geo node.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabRepairError – If the server failed to perform the request
- Return type:
None
- class gitlab.v4.objects.GeoNodeManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[GeoNode],UpdateMixin[GeoNode],DeleteMixin[GeoNode]Object Creation
Object update
Optional attributes for object update:
enabledurlfiles_max_capacityrepos_max_capacity
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- current_failures(**kwargs: Any) List[Dict[str, Any]]¶
Get the list of failures on the current geo node.
- class gitlab.v4.objects.Gitignore(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GitignoreManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[Gitignore]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.Gitlabciyml(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GitlabciymlManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[Gitlabciyml]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.Group(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- access_tokens: GroupAccessTokenManager¶
- accessrequests: GroupAccessRequestManager¶
- approval_rules: GroupApprovalRuleManager¶
- audit_events: GroupAuditEventManager¶
- badges: GroupBadgeManager¶
- billable_members: GroupBillableMemberManager¶
- boards: GroupBoardManager¶
- clusters: GroupClusterManager¶
- customattributes: GroupCustomAttributeManager¶
- deploytokens: GroupDeployTokenManager¶
- descendant_groups: GroupDescendantGroupManager¶
- epics: GroupEpicManager¶
- exports: GroupExportManager¶
- hooks: GroupHookManager¶
- imports: GroupImportManager¶
- invitations: GroupInvitationManager¶
- issues: GroupIssueManager¶
- issues_statistics: GroupIssuesStatisticsManager¶
- iterations: GroupIterationManager¶
- labels: GroupLabelManager¶
- ldap_group_links: GroupLDAPGroupLinkManager¶
- ldap_sync(**kwargs: Any) None¶
Sync LDAP groups.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Return type:
None
- member_roles: GroupMemberRoleManager¶
- members: GroupMemberManager¶
- members_all: GroupMemberAllManager¶
- mergerequests: GroupMergeRequestManager¶
- milestones: GroupMilestoneManager¶
- notificationsettings: GroupNotificationSettingsManager¶
- packages: GroupPackageManager¶
- projects: GroupProjectManager¶
- protectedbranches: GroupProtectedBranchManager¶
- pushrules: GroupPushRulesManager¶
- registry_repositories: GroupRegistryRepositoryManager¶
- restore(**kwargs: Any) None¶
Restore a group marked for deletion..
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabRestoreError – If the server failed to perform the request
- Return type:
None
- runners: GroupRunnerManager¶
- saml_group_links: GroupSAMLGroupLinkManager¶
- search(scope: str, search: str, **kwargs: Any) GitlabList | list[dict[str, Any]]¶
Search the group resources matching the provided string.
- Parameters:
scope (str) – Scope of the search
search (str) – Search string
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabSearchError – If the server failed to perform the request
- Returns:
A list of dicts describing the resources found.
- Return type:
GitlabList | list[dict[str, Any]]
- service_accounts: GroupServiceAccountManager¶
Share the group with a group.
- Parameters:
group_id (int) – ID of the group.
group_access (int) – Access level for the group.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
expires_at (str | None)
**kwargs
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Returns:
Group
- Return type:
None
- subgroups: GroupSubgroupManager¶
- transfer(group_id: int | None = None, **kwargs: Any) None¶
Transfer the group to a new parent group or make it a top-level group.
Requires GitLab ≥14.6.
- Parameters:
group_id (int | None) – ID of the new parent group. When not specified, the group to transfer is instead turned into a top-level group.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGroupTransferError – If the group could not be transferred
- Return type:
None
- transfer_project(project_id: int, **kwargs: Any) None¶
Transfer a project to this group.
- Parameters:
to_project_id – ID of the project to transfer
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
project_id (int)
**kwargs
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabTransferProjectError – If the project could not be transferred
- Return type:
None
Delete a shared group link within a group.
- Parameters:
group_id (int) – ID of the group.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server failed to perform the request
- Return type:
None
- variables: GroupVariableManager¶
- wikis: GroupWikiManager¶
- class gitlab.v4.objects.GroupAccessRequest(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
AccessRequestMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupAccessRequestManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupAccessRequest],CreateMixin[GroupAccessRequest],DeleteMixin[GroupAccessRequest]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupAccessToken(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,ObjectRotateMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupAccessTokenManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[GroupAccessToken],DeleteMixin[GroupAccessToken],RetrieveMixin[GroupAccessToken],RotateMixin[GroupAccessToken]Object Creation
Required attributes for object create:
namescopes
Optional attributes for object create:
access_levelexpires_at
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupApprovalRule(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupApprovalRuleManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[GroupApprovalRule],CreateMixin[GroupApprovalRule],UpdateMixin[GroupApprovalRule]Object Creation
Required attributes for object create:
nameapprovals_required
Optional attributes for object create:
user_idsgroup_idsrule_type
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupAuditEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupAuditEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[GroupAuditEvent]Object listing filters
created_aftercreated_before
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupBadge(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupBadgeManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
BadgeRenderMixin[GroupBadge],CRUDMixin[GroupBadge]Object Creation
Required attributes for object create:
link_urlimage_url
Object update
Optional attributes for object update:
link_urlimage_url
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupBillableMember(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- memberships: GroupBillableMemberMembershipManager¶
- class gitlab.v4.objects.GroupBillableMemberManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupBillableMember],DeleteMixin[GroupBillableMember]Object listing filters
searchsort
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupBillableMemberMembership(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupBillableMemberMembershipManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupBillableMemberMembership]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupBoard(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- lists: GroupBoardListManager¶
- class gitlab.v4.objects.GroupBoardList(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupBoardListManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[GroupBoardList]Object Creation
Mutually exclusive attributes for object create:
label_idassignee_idmilestone_iditeration_id
Object update
Required attributes for object update:
position
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupBoardManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[GroupBoard]Object Creation
Required attributes for object create:
name
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupCluster(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupClusterManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[GroupCluster]Object Creation
Required attributes for object create:
nameplatform_kubernetes_attributes
Optional attributes for object create:
domainenabledmanagedenvironment_scope
Object update
Optional attributes for object update:
namedomainmanagement_project_idplatform_kubernetes_attributesenvironment_scope
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- create(data: dict[str, Any] | None = None, **kwargs: Any) GroupCluster¶
Create a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the manage object class build with
the data sent by the server
- Return type:
- class gitlab.v4.objects.GroupCustomAttribute(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupCustomAttributeManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[GroupCustomAttribute],SetMixin[GroupCustomAttribute],DeleteMixin[GroupCustomAttribute]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupDeployToken(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupDeployTokenManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[GroupDeployToken],CreateMixin[GroupDeployToken],DeleteMixin[GroupDeployToken]Object listing filters
scopes
Object Creation
Required attributes for object create:
namescopes
Optional attributes for object create:
expires_atusername
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupDescendantGroup(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupDescendantGroupManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
SubgroupBaseManager[GroupDescendantGroup]This manager inherits from GroupSubgroupManager as descendant groups share all attributes with subgroups, except the path and object class.
Object listing filters
skip_groupsall_availablesearchorder_bysortstatisticsownedwith_custom_attributesmin_access_level
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupEpic(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- issues: GroupEpicIssueManager¶
- notes: GroupEpicNoteManager¶
- resourcelabelevents: GroupEpicResourceLabelEventManager¶
- class gitlab.v4.objects.GroupEpicAwardEmoji(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupEpicAwardEmojiManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[GroupEpicAwardEmoji]Object Creation
Required attributes for object create:
name
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupEpicDiscussionNote(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupEpicDiscussionNoteManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetMixin[GroupEpicDiscussionNote],CreateMixin[GroupEpicDiscussionNote],UpdateMixin[GroupEpicDiscussionNote],DeleteMixin[GroupEpicDiscussionNote]Object Creation
Required attributes for object create:
body
Optional attributes for object create:
created_at
Object update
Required attributes for object update:
body
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupEpicIssue(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,SaveMixin,RESTObject- Parameters:
manager (GroupEpicIssueManager)
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- manager: GroupEpicIssueManager¶
- save(**kwargs: Any) None¶
Save the changes made to the object to the server.
The object is updated to match what the server returns.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
- Return type:
None
- class gitlab.v4.objects.GroupEpicIssueManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupEpicIssue],CreateMixin[GroupEpicIssue],UpdateMixin[GroupEpicIssue],DeleteMixin[GroupEpicIssue]Object Creation
Required attributes for object create:
issue_id
Object update
Optional attributes for object update:
move_before_idmove_after_id
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- create(data: dict[str, Any] | None = None, **kwargs: Any) GroupEpicIssue¶
Create a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the manage object class build with
the data sent by the server
- Return type:
- class gitlab.v4.objects.GroupEpicManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object listing filters
author_idlabelsorder_bysortsearch
Object Creation
Required attributes for object create:
title
Optional attributes for object create:
labelsdescriptionstart_dateend_date
Object update
Optional attributes for object update:
titlelabelsdescriptionstart_dateend_date
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupEpicNote(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- awardemojis: GroupEpicNoteAwardEmojiManager¶
- class gitlab.v4.objects.GroupEpicNoteAwardEmoji(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupEpicNoteAwardEmojiManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[GroupEpicNoteAwardEmoji]Object Creation
Required attributes for object create:
name
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupEpicNoteManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[GroupEpicNote]Object Creation
Required attributes for object create:
body
Optional attributes for object create:
created_at
Object update
Required attributes for object update:
body
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupEpicResourceLabelEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupEpicResourceLabelEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[GroupEpicResourceLabelEvent]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupExport(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
DownloadMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupExportManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[GroupExport],CreateMixin[GroupExport]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupHook(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- test(trigger: str) None¶
Test a Group Hook
- Parameters:
trigger (str) – Type of trigger event to test
- Raises:
GitlabHookTestError – If the hook test attempt failed
- Return type:
None
- class gitlab.v4.objects.GroupHookManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object Creation
Required attributes for object create:
url
Optional attributes for object create:
push_eventsissues_eventsconfidential_issues_eventsmerge_requests_eventstag_push_eventsnote_eventsconfidential_note_eventsjob_eventspipeline_eventswiki_page_eventsdeployment_eventsreleases_eventssubgroup_eventsenable_ssl_verificationtoken
Object update
Required attributes for object update:
url
Optional attributes for object update:
push_eventsissues_eventsconfidential_issues_eventsmerge_requests_eventstag_push_eventsnote_eventsconfidential_note_eventsjob_eventspipeline_eventswiki_page_eventsdeployment_eventsreleases_eventssubgroup_eventsenable_ssl_verificationtoken
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupImport(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupImportManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[GroupImport]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupInvitation(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupInvitationManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
InvitationMixin[GroupInvitation]Object listing filters
query
Object Creation
Required attributes for object create:
access_level
Optional attributes for object create:
expires_atinvite_sourcetasks_to_be_donetasks_project_id
Mutually exclusive attributes for object create:
emailuser_id
Object update
Optional attributes for object update:
access_levelexpires_at
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupIssue(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupIssueManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupIssue]Object listing filters
statelabelsmilestoneorder_bysortiidsauthor_iditeration_idassignee_idmy_reaction_emojisearchcreated_aftercreated_beforeupdated_afterupdated_before
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupIssuesStatistics(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupIssuesStatisticsManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[GroupIssuesStatistics]Object listing filters
iids
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupIteration(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupIterationManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupIteration]Object listing filters
include_ancestorsinclude_descendantsinsearchstateupdated_afterupdated_before
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupLDAPGroupLink(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupLDAPGroupLinkManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupLDAPGroupLink],CreateMixin[GroupLDAPGroupLink],DeleteMixin[GroupLDAPGroupLink]Object Creation
Required attributes for object create:
providergroup_access
Mutually exclusive attributes for object create:
cnfilter
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupLabel(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SubscribableMixin,SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (GroupLabelManager)
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- manager: GroupLabelManager¶
- save(**kwargs: Any) None¶
Saves the changes made to the object to the server.
The object is updated to match what the server returns.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct.
GitlabUpdateError – If the server cannot perform the request.
- Return type:
None
- class gitlab.v4.objects.GroupLabelManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[GroupLabel],CreateMixin[GroupLabel],UpdateMixin[GroupLabel],DeleteMixin[GroupLabel]Object Creation
Required attributes for object create:
namecolor
Optional attributes for object create:
descriptionpriority
Object update
Required attributes for object update:
name
Optional attributes for object update:
new_namecolordescriptionpriority
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object listing filters
skip_groupsall_availablesearchorder_bysortstatisticsownedwith_custom_attributesmin_access_leveltop_level_only
Object Creation
Required attributes for object create:
namepath
Optional attributes for object create:
descriptionmembership_lockvisibilityshare_with_group_lockrequire_two_factor_authenticationtwo_factor_grace_periodproject_creation_levelauto_devops_enabledsubgroup_creation_levelemails_disabledavatarmentions_disabledlfs_enabledrequest_access_enabledparent_iddefault_branch_protectionshared_runners_minutes_limitextra_shared_runners_minutes_limit
Object update
Optional attributes for object update:
namepathdescriptionmembership_lockshare_with_group_lockvisibilityrequire_two_factor_authenticationtwo_factor_grace_periodproject_creation_levelauto_devops_enabledsubgroup_creation_levelemails_disabledavatarmentions_disabledlfs_enabledrequest_access_enableddefault_branch_protectionfile_template_project_idshared_runners_minutes_limitextra_shared_runners_minutes_limitprevent_forking_outside_groupshared_runners_setting
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- import_group(file: BinaryIO, path: str, name: str, parent_id: int | str | None = None, **kwargs: Any) dict[str, Any] | Response¶
Import a group from an archive file.
- Parameters:
file (BinaryIO) – Data or file object containing the group
path (str) – The path for the new group to be imported.
name (str) – The name for the new group.
parent_id (int | str | None) – ID of a parent group that the group will be imported into.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabImportError – If the server failed to perform the request
- Returns:
A representation of the import status.
- Return type:
dict[str, Any] | Response
- class gitlab.v4.objects.GroupMember(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupMemberAll(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupMemberAllManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[GroupMemberAll]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupMemberManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[GroupMember]Object Creation
Required attributes for object create:
access_level
Optional attributes for object create:
expires_attasks_to_be_done
Mutually exclusive attributes for object create:
usernameuser_id
Object update
Required attributes for object update:
access_level
Optional attributes for object update:
expires_at
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupMemberRole(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupMemberRoleManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupMemberRole],CreateMixin[GroupMemberRole],DeleteMixin[GroupMemberRole]Object Creation
Required attributes for object create:
namebase_access_level
Optional attributes for object create:
descriptionadmin_cicd_variablesadmin_compliance_frameworkadmin_group_memberadmin_group_memberadmin_merge_requestadmin_push_rulesadmin_terraform_stateadmin_vulnerabilityadmin_web_hookarchive_projectmanage_deploy_tokensmanage_group_access_tokensmanage_merge_request_settingsmanage_project_access_tokensmanage_security_policy_linkread_coderead_runnersread_dependencyread_vulnerabilityremove_groupremove_project
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupMergeRequest(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupMergeRequestManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupMergeRequest]Object listing filters
stateorder_bysortmilestoneviewlabelscreated_aftercreated_beforeupdated_afterupdated_beforescopeauthor_idassignee_idapprover_idsapproved_by_idsmy_reaction_emojisource_branchtarget_branchsearchwip
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupMilestone(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- issues(**kwargs: Any) RESTObjectList[GroupIssue]¶
List issues related to this milestone.
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
The list of issues
- Return type:
- merge_requests(**kwargs: Any) RESTObjectList[GroupMergeRequest]¶
List the merge requests related to this milestone.
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
The list of merge requests
- Return type:
- class gitlab.v4.objects.GroupMilestoneManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[GroupMilestone]Object listing filters
iidsstatesearch
Object Creation
Required attributes for object create:
title
Optional attributes for object create:
descriptiondue_datestart_date
Object update
Optional attributes for object update:
titledescriptiondue_datestart_datestate_event
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupNotificationSettings(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
NotificationSettings- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupNotificationSettingsManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NotificationSettingsManagerObject Creation
Object update
Optional attributes for object update:
levelnotification_emailnew_notenew_issuereopen_issueclose_issuereassign_issuenew_merge_requestreopen_merge_requestclose_merge_requestreassign_merge_requestmerge_merge_request
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupPackage(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupPackageManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupPackage]Object listing filters
exclude_subgroupsorder_bysortpackage_typepackage_namepackage_versioninclude_versionlessstatus
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupProject(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupProjectManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupProject]Object listing filters
archivedvisibilityorder_bysortsearchsimpleownedstarredwith_custom_attributesinclude_subgroupswith_issues_enabledwith_merge_requests_enabledwith_sharedmin_access_levelwith_security_reports
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupPushRules(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupPushRulesManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[GroupPushRules],CreateMixin[GroupPushRules],UpdateMixin[GroupPushRules],DeleteMixin[GroupPushRules]Object Creation
Optional attributes for object create:
deny_delete_tagmember_checkprevent_secretscommit_message_regexcommit_message_negative_regexbranch_name_regexauthor_email_regexfile_name_regexmax_file_sizecommit_committer_checkreject_unsigned_commits
Object update
Optional attributes for object update:
deny_delete_tagmember_checkprevent_secretscommit_message_regexcommit_message_negative_regexbranch_name_regexauthor_email_regexfile_name_regexmax_file_sizecommit_committer_checkreject_unsigned_commits
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupRegistryRepositoryManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectRegistryRepository]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupRunner(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupRunnerManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupRunner]Object listing filters
scopetag_list
Object Creation
Required attributes for object create:
runner_id
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupSAMLGroupLink(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupSAMLGroupLinkManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[GroupSAMLGroupLink]Object Creation
Required attributes for object create:
saml_group_nameaccess_level
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupServiceAccount(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupServiceAccountManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[GroupServiceAccount],DeleteMixin[GroupServiceAccount],ListMixin[GroupServiceAccount]Object Creation
Optional attributes for object create:
nameusername
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupSubgroup(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupSubgroupManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
SubgroupBaseManager[GroupSubgroup]Object listing filters
skip_groupsall_availablesearchorder_bysortstatisticsownedwith_custom_attributesmin_access_level
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupVariable(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupVariableManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[GroupVariable]Object Creation
Required attributes for object create:
keyvalue
Optional attributes for object create:
protectedvariable_typemasked
Object update
Required attributes for object update:
keyvalue
Optional attributes for object update:
protectedvariable_typemasked
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.GroupWiki(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,UploadMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.GroupWikiManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object listing filters
with_content
Object Creation
Required attributes for object create:
titlecontent
Optional attributes for object create:
format
Object update
Optional attributes for object update:
titlecontentformat
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.Hook(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.HookManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[Hook]Object Creation
Required attributes for object create:
url
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.Issue(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.IssueManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[Issue]Object listing filters
statelabelsmilestonescopeauthor_iditeration_idassignee_idmy_reaction_emojiiidsorder_bysortsearchcreated_aftercreated_beforeupdated_afterupdated_before
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.IssuesStatistics(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.IssuesStatisticsManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[IssuesStatistics]Object listing filters
iids
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.Key(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.KeyManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- get(id: int | str | None = None, lazy: bool = False, **kwargs: Any) Key¶
Retrieve a single object.
- Parameters:
id (int | str | None) – ID of the object to retrieve
lazy (bool) – If True, don’t request the server, but create a shallow object giving access to the managers. This is useful if you want to avoid useless calls to the API.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The generated RESTObject.
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.LDAPGroup(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.LDAPGroupManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RESTManager[LDAPGroup]Object listing filters
searchprovider
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- list(*, iterator: bool = False, **kwargs: Any) list[LDAPGroup] | RESTObjectList[LDAPGroup]¶
Retrieve a list of objects.
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
iterator (bool) – If set to True and no pagination option is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The list of objects, or a generator if iterator is True
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.License(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.LicenseManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[License]Object listing filters
popular
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.MemberRole(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.MemberRoleManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[MemberRole],CreateMixin[MemberRole],DeleteMixin[MemberRole]Object Creation
Required attributes for object create:
namebase_access_level
Optional attributes for object create:
descriptionadmin_cicd_variablesadmin_compliance_frameworkadmin_group_memberadmin_group_memberadmin_merge_requestadmin_push_rulesadmin_terraform_stateadmin_vulnerabilityadmin_web_hookarchive_projectmanage_deploy_tokensmanage_group_access_tokensmanage_merge_request_settingsmanage_project_access_tokensmanage_security_policy_linkread_coderead_runnersread_dependencyread_vulnerabilityremove_groupremove_project
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.MergeRequest(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.MergeRequestManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[MergeRequest]Object listing filters
stateorder_bysortmilestoneviewlabelswith_labels_detailswith_merge_status_recheckcreated_aftercreated_beforeupdated_afterupdated_beforescopeauthor_idauthor_usernameassignee_idapprover_idsapproved_by_idsreviewer_idreviewer_usernamemy_reaction_emojisource_branchtarget_branchsearchinwipnotenvironmentdeployed_beforedeployed_after
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.Namespace(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.NamespaceManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[Namespace]Object listing filters
search
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- exists(namespace: str, **kwargs: Any) Namespace¶
Get existence of a namespace by path.
- Parameters:
namespace (str) – The path to the namespace.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
Data on namespace existence returned from the server.
- Return type:
- class gitlab.v4.objects.NotificationSettings(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.NotificationSettingsManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[NotificationSettings],UpdateMixin[NotificationSettings]Object Creation
Object update
Optional attributes for object update:
levelnotification_emailnew_notenew_issuereopen_issueclose_issuereassign_issuenew_merge_requestreopen_merge_requestclose_merge_requestreassign_merge_requestmerge_merge_request
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.PagesDomain(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.PagesDomainManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[PagesDomain]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.PersonalAccessToken(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,ObjectRotateMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.PersonalAccessTokenManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
DeleteMixin[PersonalAccessToken],RetrieveMixin[PersonalAccessToken],RotateMixin[PersonalAccessToken]Object listing filters
user_id
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.Project(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,SaveMixin,ObjectDeleteMixin,RepositoryMixin,UploadMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- access_tokens: ProjectAccessTokenManager¶
- accessrequests: ProjectAccessRequestManager¶
- additionalstatistics: ProjectAdditionalStatisticsManager¶
- approvalrules: ProjectApprovalRuleManager¶
- approvals: ProjectApprovalManager¶
- archive(**kwargs: Any) None¶
Archive a project.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Return type:
None
- artifacts: ProjectArtifactManager¶
- audit_events: ProjectAuditEventManager¶
- badges: ProjectBadgeManager¶
- boards: ProjectBoardManager¶
- branches: ProjectBranchManager¶
- ci_lint: ProjectCiLintManager¶
- cluster_agents: ProjectClusterAgentManager¶
- clusters: ProjectClusterManager¶
- commits: ProjectCommitManager¶
- create_fork_relation(forked_from_id: int, **kwargs: Any) None¶
Create a forked from/to relation between existing projects.
- Parameters:
forked_from_id (int) – The ID of the project that was forked from
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the relation could not be created
- Return type:
None
- customattributes: ProjectCustomAttributeManager¶
- delete_fork_relation(**kwargs: Any) None¶
Delete a forked relation between existing projects.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server failed to perform the request
- Return type:
None
- deployments: ProjectDeploymentManager¶
- deploytokens: ProjectDeployTokenManager¶
- dockerfile_templates: ProjectDockerfileTemplateManager¶
- environments: ProjectEnvironmentManager¶
- events: ProjectEventManager¶
- exports: ProjectExportManager¶
- external_status_checks: ProjectExternalStatusCheckManager¶
- files: ProjectFileManager¶
- forks: ProjectForkManager¶
- generic_packages: GenericPackageManager¶
- gitignore_templates: ProjectGitignoreTemplateManager¶
- gitlabciyml_templates: ProjectGitlabciymlTemplateManager¶
- groups: ProjectGroupManager¶
- hooks: ProjectHookManager¶
- housekeeping(**kwargs: Any) None¶
Start the housekeeping task.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabHousekeepingError – If the server failed to perform the request
- Return type:
None
- imports: ProjectImportManager¶
- integrations: ProjectIntegrationManager¶
- invitations: ProjectInvitationManager¶
- issue_templates: ProjectIssueTemplateManager¶
- issues: ProjectIssueManager¶
- issues_statistics: ProjectIssuesStatisticsManager¶
- iterations: ProjectIterationManager¶
- job_token_scope: ProjectJobTokenScopeManager¶
- jobs: ProjectJobManager¶
- keys: ProjectKeyManager¶
- labels: ProjectLabelManager¶
- languages(**kwargs: Any) dict[str, Any] | Response¶
Get languages used in the project with percentage value.
- license_templates: ProjectLicenseTemplateManager¶
- members: ProjectMemberManager¶
- members_all: ProjectMemberAllManager¶
- merge_request_templates: ProjectMergeRequestTemplateManager¶
- merge_trains: ProjectMergeTrainManager¶
- mergerequests: ProjectMergeRequestManager¶
- milestones: ProjectMilestoneManager¶
- mirror_pull(**kwargs: Any) None¶
Start the pull mirroring process for the project.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Return type:
None
- mirror_pull_details(**kwargs: Any) dict[str, Any]¶
Get a project’s pull mirror details.
Introduced in GitLab 15.5.
- notes: ProjectNoteManager¶
- notificationsettings: ProjectNotificationSettingsManager¶
- package_protection_rules: ProjectPackageProtectionRuleManager¶
- packages: ProjectPackageManager¶
- pages: ProjectPagesManager¶
- pagesdomains: ProjectPagesDomainManager¶
- pipelines: ProjectPipelineManager¶
- pipelineschedules: ProjectPipelineScheduleManager¶
- protected_environments: ProjectProtectedEnvironmentManager¶
- protectedbranches: ProjectProtectedBranchManager¶
- protectedtags: ProjectProtectedTagManager¶
- pull_mirror: ProjectPullMirrorManager¶
- pushrules: ProjectPushRulesManager¶
- registry_protection_repository_rules: ProjectRegistryRepositoryProtectionRuleManager¶
- registry_protection_rules: ProjectRegistryProtectionRuleManager¶
- releases: ProjectReleaseManager¶
- remote_mirrors: ProjectRemoteMirrorManager¶
- repositories: ProjectRegistryRepositoryManager¶
- resource_groups: ProjectResourceGroupManager¶
- restore(**kwargs: Any) None¶
Restore a project marked for deletion.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabRestoreError – If the server failed to perform the request
- Return type:
None
- runners: ProjectRunnerManager¶
- search(scope: str, search: str, **kwargs: Any) GitlabList | list[dict[str, Any]]¶
Search the project resources matching the provided string.’
- Parameters:
scope (str) – Scope of the search
search (str) – Search string
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabSearchError – If the server failed to perform the request
- Returns:
A list of dicts describing the resources found.
- Return type:
GitlabList | list[dict[str, Any]]
- secure_files: ProjectSecureFileManager¶
- services: ProjectServiceManager¶
Share the project with a group.
- Parameters:
group_id (int) – ID of the group.
group_access (int) – Access level for the group.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
expires_at (str | None)
**kwargs
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Return type:
None
- snapshot(wiki: bool = False, streamed: bool = False, action: Callable[[bytes], Any] | None = None, chunk_size: int = 1024, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Return a snapshot of the repository.
- Parameters:
wiki (bool) – If True return the wiki repository
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment.
iterator (bool) – If True directly return the underlying response iterator
action (Callable[[bytes], Any] | None) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the content could not be retrieved
- Returns:
The uncompressed tar archive of the repository
- Return type:
bytes | Iterator[Any] | None
- snippets: ProjectSnippetManager¶
- star(**kwargs: Any) None¶
Star a project.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Return type:
None
- storage: ProjectStorageManager¶
- tags: ProjectTagManager¶
- transfer(to_namespace: int | str, **kwargs: Any) None¶
Transfer a project to the given namespace ID
- Parameters:
to_namespace (int | str) – ID or path of the namespace to transfer the
to (project)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabTransferProjectError – If the project could not be transferred
- Return type:
None
- trigger_pipeline(ref: str, token: str, variables: dict[str, Any] | None = None, inputs: dict[str, Any] | None = None, **kwargs: Any) ProjectPipeline¶
Trigger a CI build.
See https://gitlab.com/help/ci/triggers/README.md#trigger-a-build
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Return type:
- triggers: ProjectTriggerManager¶
- unarchive(**kwargs: Any) None¶
Unarchive a project.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server failed to perform the request
- Return type:
None
Delete a shared project link within a group.
- Parameters:
group_id (int) – ID of the group.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server failed to perform the request
- Return type:
None
- unstar(**kwargs: Any) None¶
Unstar a project.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server failed to perform the request
- Return type:
None
- users: ProjectUserManager¶
- variables: ProjectVariableManager¶
- wikis: ProjectWikiManager¶
- class gitlab.v4.objects.ProjectAccessRequest(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
AccessRequestMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectAccessRequestManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectAccessRequest],CreateMixin[ProjectAccessRequest],DeleteMixin[ProjectAccessRequest]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectAccessToken(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,ObjectRotateMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectAccessTokenManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[ProjectAccessToken],DeleteMixin[ProjectAccessToken],RetrieveMixin[ProjectAccessToken],RotateMixin[ProjectAccessToken]Object Creation
Required attributes for object create:
namescopes
Optional attributes for object create:
access_levelexpires_at
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectAdditionalStatistics(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectAdditionalStatisticsManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectAdditionalStatistics]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectApproval(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectApprovalManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectApproval],UpdateMixin[ProjectApproval]Object Creation
Object update
Optional attributes for object update:
approvals_before_mergereset_approvals_on_pushdisable_overriding_approvers_per_merge_requestmerge_requests_author_approvalmerge_requests_disable_committers_approval
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectApprovalRule(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectApprovalRuleManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectApprovalRule],CreateMixin[ProjectApprovalRule],UpdateMixin[ProjectApprovalRule],DeleteMixin[ProjectApprovalRule]Object Creation
Required attributes for object create:
nameapprovals_required
Optional attributes for object create:
user_idsgroup_idsprotected_branch_idsusernames
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectArtifact(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObjectDummy object to manage custom actions on artifacts
- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectArtifactManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RESTManager[ProjectArtifact]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- delete(**kwargs: Any) None¶
Delete the project’s artifacts on the server.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server cannot perform the request
- Return type:
None
- download(ref_name: str, job: str, streamed: bool = False, action: Callable[[bytes], Any] | None = None, chunk_size: int = 1024, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Get the job artifacts archive from a specific tag or branch.
- Parameters:
ref_name (str) – Branch or tag name in repository. HEAD or SHA references are not supported.
job (str) – The name of the job.
job_token – Job token for multi-project pipeline triggers.
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
iterator (bool) – If True directly return the underlying response iterator
action (Callable[[bytes], Any] | None) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the artifacts could not be retrieved
- Returns:
The artifacts if streamed is False, None otherwise.
- Return type:
bytes | Iterator[Any] | None
- raw(ref_name: str, artifact_path: str, job: str, streamed: bool = False, action: Callable[[bytes], Any] | None = None, chunk_size: int = 1024, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Download a single artifact file from a specific tag or branch from within the job’s artifacts archive.
- Parameters:
ref_name (str) – Branch or tag name in repository. HEAD or SHA references are not supported.
artifact_path (str) – Path to a file inside the artifacts archive.
job (str) – The name of the job.
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
iterator (bool) – If True directly return the underlying response iterator
action (Callable[[bytes], Any] | None) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the artifacts could not be retrieved
- Returns:
The artifact if streamed is False, None otherwise.
- Return type:
bytes | Iterator[Any] | None
- class gitlab.v4.objects.ProjectAudit(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ProjectAuditEvent- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectAuditEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectAuditEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectAuditEvent]Object listing filters
created_aftercreated_before
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectAuditManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ProjectAuditEventManagerObject listing filters
created_aftercreated_before
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectBadge(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectBadgeManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
BadgeRenderMixin[ProjectBadge],CRUDMixin[ProjectBadge]Object Creation
Required attributes for object create:
link_urlimage_url
Object update
Optional attributes for object update:
link_urlimage_url
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectBoard(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- lists: ProjectBoardListManager¶
- class gitlab.v4.objects.ProjectBoardList(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectBoardListManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectBoardList]Object Creation
Mutually exclusive attributes for object create:
label_idassignee_idmilestone_iditeration_id
Object update
Required attributes for object update:
position
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectBoardManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectBoard]Object Creation
Required attributes for object create:
name
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectBranch(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectBranchManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[ProjectBranch]Object Creation
Required attributes for object create:
branchref
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectCiLint(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectCiLintManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectCiLint],CreateMixin[ProjectCiLint]Object Creation
Required attributes for object create:
content
Optional attributes for object create:
dry_runinclude_jobsref
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectCluster(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectClusterAgent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectClusterAgentManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[ProjectClusterAgent]Object Creation
Required attributes for object create:
name
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectClusterManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectCluster]Object Creation
Required attributes for object create:
nameplatform_kubernetes_attributes
Optional attributes for object create:
domainenabledmanagedenvironment_scope
Object update
Optional attributes for object update:
namedomainmanagement_project_idplatform_kubernetes_attributesenvironment_scope
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- create(data: dict[str, Any] | None = None, **kwargs: Any) ProjectCluster¶
Create a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the manage object class build with
the data sent by the server
- Return type:
- class gitlab.v4.objects.ProjectCommit(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- cherry_pick(branch: str, **kwargs: Any) dict[str, Any] | Response¶
Cherry-pick a commit into a branch.
- Parameters:
branch (str) – Name of target branch
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCherryPickError – If the cherry-pick could not be performed
- Returns:
The new commit data (not a RESTObject)
- Return type:
dict[str, Any] | Response
- comments: ProjectCommitCommentManager¶
- diff(**kwargs: Any) GitlabList | list[dict[str, Any]]¶
Generate the commit diff.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the diff could not be retrieved
- Returns:
The changes done in this commit
- Return type:
GitlabList | list[dict[str, Any]]
- discussions: ProjectCommitDiscussionManager¶
- merge_requests(**kwargs: Any) GitlabList | list[dict[str, Any]]¶
List the merge requests related to the commit.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the references could not be retrieved
- Returns:
The merge requests related to the commit.
- Return type:
GitlabList | list[dict[str, Any]]
- refs(type: str = 'all', **kwargs: Any) GitlabList | list[dict[str, Any]]¶
List the references the commit is pushed to.
- Parameters:
type (str) – The scope of references (‘branch’, ‘tag’ or ‘all’)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the references could not be retrieved
- Returns:
The references the commit is pushed to.
- Return type:
GitlabList | list[dict[str, Any]]
- revert(branch: str, **kwargs: Any) dict[str, Any] | Response¶
Revert a commit on a given branch.
- Parameters:
branch (str) – Name of target branch
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabRevertError – If the revert could not be performed
- Returns:
The new commit data (not a RESTObject)
- Return type:
dict[str, Any] | Response
- statuses: ProjectCommitStatusManager¶
- class gitlab.v4.objects.ProjectCommitComment(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectCommitCommentManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectCommitComment],CreateMixin[ProjectCommitComment]Object Creation
Required attributes for object create:
note
Optional attributes for object create:
pathlineline_type
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectCommitDiscussion(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectCommitDiscussionManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectCommitDiscussion],CreateMixin[ProjectCommitDiscussion]Object Creation
Required attributes for object create:
body
Optional attributes for object create:
created_at
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectCommitDiscussionNote(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectCommitDiscussionNoteManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetMixin[ProjectCommitDiscussionNote],CreateMixin[ProjectCommitDiscussionNote],UpdateMixin[ProjectCommitDiscussionNote],DeleteMixin[ProjectCommitDiscussionNote]Object Creation
Required attributes for object create:
body
Optional attributes for object create:
created_atposition
Object update
Required attributes for object update:
body
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectCommitManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectCommit],CreateMixin[ProjectCommit]Object listing filters
allref_namesinceuntilpathwith_statsfirst_parentordertrailers
Object Creation
Required attributes for object create:
branchcommit_messageactions
Optional attributes for object create:
author_emailauthor_name
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectCommitStatus(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectCommitStatusManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectCommitStatus],CreateMixin[ProjectCommitStatus]Object Creation
Required attributes for object create:
state
Optional attributes for object create:
descriptionnamecontextreftarget_urlcoverage
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- create(data: dict[str, Any] | None = None, **kwargs: Any) ProjectCommitStatus¶
Create a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the manage object class build with
the data sent by the server
- Return type:
- class gitlab.v4.objects.ProjectCustomAttribute(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectCustomAttributeManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectCustomAttribute],SetMixin[ProjectCustomAttribute],DeleteMixin[ProjectCustomAttribute]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectDeployToken(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectDeployTokenManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectDeployToken],CreateMixin[ProjectDeployToken],DeleteMixin[ProjectDeployToken]Object listing filters
scopes
Object Creation
Required attributes for object create:
namescopes
Optional attributes for object create:
expires_atusername
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectDeployment(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- approval(status: str, comment: str | None = None, represented_as: str | None = None, **kwargs: Any) dict[str, Any]¶
Approve or reject a blocked deployment.
- Parameters:
status (str) – Either “approved” or “rejected”
comment (str | None) – A comment to go with the approval
represented_as (str | None) – The name of the User/Group/Role to use for the approval, when the user belongs to multiple approval rules.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabMRApprovalError – If the approval failed
- Returns:
A dict containing the result.
- Return type:
dict[str, Any]
https://docs.gitlab.com/ee/api/deployments.html#approve-or-reject-a-blocked-deployment
- mergerequests: ProjectDeploymentMergeRequestManager¶
- class gitlab.v4.objects.ProjectDeploymentManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectDeployment],CreateMixin[ProjectDeployment],UpdateMixin[ProjectDeployment]Object listing filters
order_bysortupdated_afterupdated_beforeenvironmentstatus
Object Creation
Required attributes for object create:
shareftagstatusenvironment
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectDeploymentMergeRequest(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
MergeRequest- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectDeploymentMergeRequestManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
MergeRequestManagerObject listing filters
stateorder_bysortmilestoneviewlabelswith_labels_detailswith_merge_status_recheckcreated_aftercreated_beforeupdated_afterupdated_beforescopeauthor_idauthor_usernameassignee_idapprover_idsapproved_by_idsreviewer_idreviewer_usernamemy_reaction_emojisource_branchtarget_branchsearchinwipnotenvironmentdeployed_beforedeployed_after
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectDockerfileTemplate(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectDockerfileTemplateManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectDockerfileTemplate]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectEnvironment(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectEnvironmentManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectEnvironment],CreateMixin[ProjectEnvironment],UpdateMixin[ProjectEnvironment],DeleteMixin[ProjectEnvironment]Object listing filters
namesearchstates
Object Creation
Required attributes for object create:
name
Optional attributes for object create:
external_url
Object update
Optional attributes for object update:
nameexternal_url
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
Event- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
EventManagerObject listing filters
actiontarget_typebeforeaftersortscope
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectExport(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
DownloadMixin,RefreshMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectExportManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectExport],CreateMixin[ProjectExport]Object Creation
Optional attributes for object create:
description
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectExternalStatusCheck(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectExternalStatusCheckManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectExternalStatusCheck],CreateMixin[ProjectExternalStatusCheck],UpdateMixin[ProjectExternalStatusCheck],DeleteMixin[ProjectExternalStatusCheck]Object Creation
Required attributes for object create:
nameexternal_url
Optional attributes for object create:
shared_secretprotected_branch_ids
Object update
Optional attributes for object update:
nameexternal_urlshared_secretprotected_branch_ids
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectFile(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (ProjectFileManager)
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- branch: str¶
- commit_message: str¶
- content: str¶
- decode() bytes¶
Returns the decoded content of the file.
- Returns:
The decoded content.
- Return type:
bytes
- delete(branch: str, commit_message: str, **kwargs: Any) None¶
Delete the file from the server.
- Parameters:
branch (str) – Branch from which the file will be removed
commit_message (str) – Commit message for the deletion
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server cannot perform the request
- Return type:
None
- file_path: str¶
- manager: ProjectFileManager¶
- save(branch: str, commit_message: str, **kwargs: Any) None¶
Save the changes made to the file to the server.
The object is updated to match what the server returns.
- Parameters:
branch (str) – Branch in which the file will be updated
commit_message (str) – Message to send with the commit
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
- Return type:
None
- class gitlab.v4.objects.ProjectFileManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[ProjectFile],UpdateMixin[ProjectFile],DeleteMixin[ProjectFile]Object Creation
Required attributes for object create:
file_pathbranchcontentcommit_message
Optional attributes for object create:
encodingauthor_emailauthor_nameexecute_filemodestart_branch
Object update
Required attributes for object update:
file_pathbranchcontentcommit_message
Optional attributes for object update:
encodingauthor_emailauthor_nameexecute_filemodestart_branchlast_commit_id
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- blame(file_path: str, ref: str, **kwargs: Any) list[dict[str, Any]]¶
Return the content of a file for a commit.
- Parameters:
file_path (str) – Path of the file to retrieve
ref (str) – Name of the branch, tag or commit
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server failed to perform the request
- Returns:
A list of commits/lines matching the file
- Return type:
list[dict[str, Any]]
- create(data: dict[str, Any] | None = None, **kwargs: Any) ProjectFile¶
Create a new object.
- Parameters:
- Returns:
- a new instance of the managed object class built with
the data sent by the server
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Return type:
- delete(file_path: str, branch: str, commit_message: str, **kwargs: Any) None¶
Delete a file on the server.
- Parameters:
file_path (str) – Path of the file to remove
branch (str) – Branch from which the file will be removed
commit_message (str) – Commit message for the deletion
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server cannot perform the request
- Return type:
None
- get(file_path: str, ref: str, **kwargs: Any) ProjectFile¶
Retrieve a single file.
- Parameters:
file_path (str) – Path of the file to retrieve
ref (str) – Name of the branch, tag or commit
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the file could not be retrieved
- Returns:
The generated RESTObject
- Return type:
- head(file_path: str, ref: str, **kwargs: Any) CaseInsensitiveDict[Any]¶
Retrieve just metadata for a single file.
- Parameters:
file_path (str) – Path of the file to retrieve
ref (str) – Name of the branch, tag or commit
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the file could not be retrieved
- Returns:
The response headers as a dictionary
- Return type:
CaseInsensitiveDict[Any]
- raw(file_path: str, ref: str | None = None, streamed: bool = False, action: Callable[[...], Any] | None = None, chunk_size: int = 1024, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Return the content of a file for a commit.
- Parameters:
file_path (str) – Path of the file to return
ref (str | None) – ID of the commit
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
action (Callable[[...], Any] | None) – Callable responsible for dealing with each chunk of data
chunk_size (int) – Size of each chunk
iterator (bool) – If True directly return the underlying response iterator
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the file could not be retrieved
- Returns:
The file content
- Return type:
bytes | Iterator[Any] | None
- update(file_path: str, new_data: dict[str, Any] | None = None, **kwargs: Any) dict[str, Any]¶
Update an object on the server.
- Parameters:
- Returns:
The new object data (not a RESTObject)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server cannot perform the request
- Return type:
dict[str, Any]
- class gitlab.v4.objects.ProjectFork(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectForkManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[ProjectFork],ListMixin[ProjectFork]Object listing filters
archivedvisibilityorder_bysortsearchsimpleownedmembershipstarredstatisticswith_custom_attributeswith_issues_enabledwith_merge_requests_enabled
Object Creation
Optional attributes for object create:
namespace
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- create(data: dict[str, Any] | None = None, **kwargs: Any) ProjectFork¶
Creates a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the managed object class build with
the data sent by the server
- Return type:
- class gitlab.v4.objects.ProjectGitignoreTemplate(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectGitignoreTemplateManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectGitignoreTemplate]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectGitlabciymlTemplate(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectGitlabciymlTemplateManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectGitlabciymlTemplate]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectHook(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- test(trigger: str) None¶
Test a Project Hook
- Parameters:
trigger (str) – Type of trigger event to test
- Raises:
GitlabHookTestError – If the hook test attempt failed
- Return type:
None
- class gitlab.v4.objects.ProjectHookManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectHook]Object Creation
Required attributes for object create:
url
Optional attributes for object create:
push_eventsissues_eventsconfidential_issues_eventsmerge_requests_eventstag_push_eventsnote_eventsjob_eventspipeline_eventswiki_page_eventsenable_ssl_verificationtoken
Object update
Required attributes for object update:
url
Optional attributes for object update:
push_eventsissues_eventsconfidential_issues_eventsmerge_requests_eventstag_push_eventsnote_eventsjob_eventspipeline_eventswiki_eventsenable_ssl_verificationtoken
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectImport(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectImportManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectImport]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIntegration(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIntegrationManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetMixin[ProjectIntegration],UpdateMixin[ProjectIntegration],DeleteMixin[ProjectIntegration],ListMixin[ProjectIntegration]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- available() List[str]¶
List the services known by python-gitlab.
- Returns:
The list of service code names.
- Return type:
List[str]
- class gitlab.v4.objects.ProjectInvitation(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectInvitationManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
InvitationMixin[ProjectInvitation]Object listing filters
query
Object Creation
Required attributes for object create:
access_level
Optional attributes for object create:
expires_atinvite_sourcetasks_to_be_donetasks_project_id
Mutually exclusive attributes for object create:
emailuser_id
Object update
Optional attributes for object update:
access_levelexpires_at
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssue(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
UserAgentDetailMixin,SubscribableMixin,TodoMixin,TimeTrackingMixin,ParticipantsMixin,SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- awardemojis: ProjectIssueAwardEmojiManager¶
- closed_by(**kwargs: Any) GitlabList | list[dict[str, Any]]¶
List merge requests that will close the issue when merged.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetErrot – If the merge requests could not be retrieved
- Returns:
The list of merge requests.
- Return type:
GitlabList | list[dict[str, Any]]
- discussions: ProjectIssueDiscussionManager¶
- links: ProjectIssueLinkManager¶
- move(to_project_id: int, **kwargs: Any) None¶
Move the issue to another project.
- Parameters:
to_project_id (int) – ID of the target project
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the issue could not be moved
- Return type:
None
- notes: ProjectIssueNoteManager¶
List merge requests related to the issue.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetErrot – If the merge requests could not be retrieved
- Returns:
The list of merge requests.
- Return type:
GitlabList | list[dict[str, Any]]
- reorder(move_after_id: int | None = None, move_before_id: int | None = None, **kwargs: Any) None¶
Reorder an issue on a board.
- Parameters:
move_after_id (int | None) – ID of an issue that should be placed after this issue
move_before_id (int | None) – ID of an issue that should be placed before this issue
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the issue could not be reordered
- Return type:
None
- resource_iteration_events: ProjectIssueResourceIterationEventManager¶
- resource_weight_events: ProjectIssueResourceWeightEventManager¶
- resourcelabelevents: ProjectIssueResourceLabelEventManager¶
- resourcemilestoneevents: ProjectIssueResourceMilestoneEventManager¶
- resourcestateevents: ProjectIssueResourceStateEventManager¶
- class gitlab.v4.objects.ProjectIssueAwardEmoji(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIssueAwardEmojiManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[ProjectIssueAwardEmoji]Object Creation
Required attributes for object create:
name
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssueDiscussion(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIssueDiscussionManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectIssueDiscussion],CreateMixin[ProjectIssueDiscussion]Object Creation
Required attributes for object create:
body
Optional attributes for object create:
created_at
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssueDiscussionNote(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIssueDiscussionNoteManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectIssueDiscussionNote]Object Creation
Required attributes for object create:
body
Optional attributes for object create:
created_at
Object update
Required attributes for object update:
body
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssueLink(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIssueLinkManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectIssueLink],CreateMixin[ProjectIssueLink],DeleteMixin[ProjectIssueLink]Object Creation
Required attributes for object create:
target_project_idtarget_issue_iid
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- create(data: dict[str, Any], **kwargs: Any) tuple[ProjectIssue, ProjectIssue]¶
Create a new object.
- Parameters:
- Returns:
The source and target issues
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Return type:
tuple[ProjectIssue, ProjectIssue]
- class gitlab.v4.objects.ProjectIssueManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectIssue]Object listing filters
iidsstatelabelsmilestonescopeauthor_iditeration_idassignee_idmy_reaction_emojiorder_bysortsearchcreated_aftercreated_beforeupdated_afterupdated_before
Object Creation
Required attributes for object create:
title
Optional attributes for object create:
descriptionconfidentialassignee_idsassignee_idmilestone_idlabelscreated_atdue_datemerge_request_to_resolve_discussions_ofdiscussion_to_resolve
Object update
Optional attributes for object update:
titledescriptionconfidentialassignee_idsassignee_idmilestone_idlabelsstate_eventupdated_atdue_datediscussion_locked
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssueNote(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- awardemojis: ProjectIssueNoteAwardEmojiManager¶
- class gitlab.v4.objects.ProjectIssueNoteAwardEmoji(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIssueNoteAwardEmojiManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[ProjectIssueNoteAwardEmoji]Object Creation
Required attributes for object create:
name
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssueNoteManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectIssueNote]Object Creation
Required attributes for object create:
body
Optional attributes for object create:
created_at
Object update
Required attributes for object update:
body
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssueResourceIterationEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIssueResourceIterationEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectIssueResourceIterationEvent]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssueResourceLabelEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIssueResourceLabelEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectIssueResourceLabelEvent]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssueResourceMilestoneEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIssueResourceMilestoneEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectIssueResourceMilestoneEvent]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssueResourceStateEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIssueResourceStateEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectIssueResourceStateEvent]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssueResourceWeightEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIssueResourceWeightEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectIssueResourceWeightEvent]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssueTemplate(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIssueTemplateManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectIssueTemplate]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIssuesStatistics(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectIssuesStatisticsManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectIssuesStatistics]Object listing filters
iids
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectIterationManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[GroupIteration]Object listing filters
include_ancestorsinclude_descendantsinsearchstateupdated_afterupdated_before
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectJob(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- artifact(path: str, streamed: bool = False, action: Callable[[...], Any] | None = None, chunk_size: int = 1024, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Get a single artifact file from within the job’s artifacts archive.
- Parameters:
path (str) – Path of the artifact
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
iterator (bool) – If True directly return the underlying response iterator
action (Callable[[...], Any] | None) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the artifacts could not be retrieved
- Returns:
The artifacts if streamed is False, None otherwise.
- Return type:
bytes | Iterator[Any] | None
- artifacts(streamed: bool = False, action: Callable[[...], Any] | None = None, chunk_size: int = 1024, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Get the job artifacts.
- Parameters:
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
iterator (bool) – If True directly return the underlying response iterator
action (Callable[[...], Any] | None) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the artifacts could not be retrieved
- Returns:
The artifacts if streamed is False, None otherwise.
- Return type:
bytes | Iterator[Any] | None
- delete_artifacts(**kwargs: Any) None¶
Delete artifacts of a job.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the request could not be performed
- Return type:
None
- erase(**kwargs: Any) None¶
Erase the job (remove job artifacts and trace).
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabJobEraseError – If the job could not be erased
- Return type:
None
- keep_artifacts(**kwargs: Any) None¶
Prevent artifacts from being deleted when expiration is set.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the request could not be performed
- Return type:
None
- play(**kwargs: Any) None¶
Trigger a job explicitly.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabJobPlayError – If the job could not be triggered
- Return type:
None
- trace(streamed: bool = False, action: Callable[[...], Any] | None = None, chunk_size: int = 1024, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Get the job trace.
- Parameters:
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
iterator (bool) – If True directly return the underlying response iterator
action (Callable[[...], Any] | None) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the artifacts could not be retrieved
- Returns:
The trace
- Return type:
bytes | Iterator[Any] | None
- class gitlab.v4.objects.ProjectJobManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectJob]Object listing filters
scopeorder_bysort
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectJobTokenScope(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- allowlist: AllowlistProjectManager¶
- groups_allowlist: AllowlistGroupManager¶
- class gitlab.v4.objects.ProjectJobTokenScopeManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectJobTokenScope],UpdateMixin[ProjectJobTokenScope]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectKey(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectKeyManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectKey]Object Creation
Required attributes for object create:
titlekey
Optional attributes for object create:
can_pushexpires_at
Object update
Optional attributes for object update:
titlecan_pushexpires_at
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- enable(key_id: int, **kwargs: Any) dict[str, Any] | Response¶
Enable a deploy key for a project.
- Parameters:
key_id (int) – The ID of the key to enable
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabProjectDeployKeyError – If the key could not be enabled
- Returns:
A dict of the result.
- Return type:
dict[str, Any] | Response
- class gitlab.v4.objects.ProjectLabel(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
PromoteMixin,SubscribableMixin,SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (ProjectLabelManager)
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- manager: ProjectLabelManager¶
- save(**kwargs: Any) None¶
Saves the changes made to the object to the server.
The object is updated to match what the server returns.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct.
GitlabUpdateError – If the server cannot perform the request.
- Return type:
None
- class gitlab.v4.objects.ProjectLabelManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectLabel],CreateMixin[ProjectLabel],UpdateMixin[ProjectLabel],DeleteMixin[ProjectLabel]Object Creation
Required attributes for object create:
namecolor
Optional attributes for object create:
descriptionpriority
Object update
Required attributes for object update:
name
Optional attributes for object update:
new_namecolordescriptionpriority
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectLicenseTemplate(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectLicenseTemplateManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectLicenseTemplate]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object listing filters
archivedid_afterid_beforelast_activity_afterlast_activity_beforemembershipmin_access_levelorder_byownedrepository_checksum_failedrepository_storagesearch_namespacessearchsimplesortstarredstatisticstopicvisibilitywiki_checksum_failedwith_custom_attributeswith_issues_enabledwith_merge_requests_enabledwith_programming_language
Object Creation
Optional attributes for object create:
namepathallow_merge_on_skipped_pipelineonly_allow_merge_if_all_status_checks_passedanalytics_access_levelapprovals_before_mergeauto_cancel_pending_pipelinesauto_devops_deploy_strategyauto_devops_enabledautoclose_referenced_issuesavatarbuild_coverage_regexbuild_git_strategybuild_timeoutbuilds_access_levelci_config_pathcontainer_expiration_policy_attributescontainer_registry_access_levelcontainer_registry_enableddefault_branchdescriptionemails_disabledexternal_authorization_classification_labelforking_access_levelgroup_with_project_templates_idimport_urlinitialize_with_readmeissues_access_levelissues_enabledjobs_enabledlfs_enabledmerge_methodmerge_pipelines_enabledmerge_requests_access_levelmerge_requests_enabledmirror_trigger_buildsmirrornamespace_idoperations_access_levelonly_allow_merge_if_all_discussions_are_resolvedonly_allow_merge_if_pipeline_succeedspackages_enabledpages_access_levelrequirements_access_levelprinting_merge_request_link_enabledpublic_buildsreleases_access_levelenvironments_access_levelfeature_flags_access_levelinfrastructure_access_levelmonitor_access_levelremove_source_branch_after_mergerepository_access_levelrepository_storagerequest_access_enabledresolve_outdated_diff_discussionssecurity_and_compliance_access_levelshared_runners_enabledshow_default_award_emojissnippets_access_levelsnippets_enabledsquash_optiontag_listtopicstemplate_nametemplate_project_iduse_custom_templatevisibilitywiki_access_levelwiki_enabled
Object update
Optional attributes for object update:
allow_merge_on_skipped_pipelineonly_allow_merge_if_all_status_checks_passedanalytics_access_levelapprovals_before_mergeauto_cancel_pending_pipelinesauto_devops_deploy_strategyauto_devops_enabledautoclose_referenced_issuesavatarbuild_coverage_regexbuild_git_strategybuild_timeoutbuilds_access_levelci_config_pathci_default_git_depthci_forward_deployment_enabledci_allow_fork_pipelines_to_run_in_parent_projectci_separated_cachescontainer_expiration_policy_attributescontainer_registry_access_levelcontainer_registry_enableddefault_branchdescriptionemails_disabledenforce_auth_checks_on_uploadsexternal_authorization_classification_labelforking_access_levelimport_urlissues_access_levelissues_enabledissues_templatejobs_enabledkeep_latest_artifactlfs_enabledmerge_commit_templatemerge_methodmerge_pipelines_enabledmerge_requests_access_levelmerge_requests_enabledmerge_requests_templatemerge_trains_enabledmirror_overwrites_diverged_branchesmirror_trigger_buildsmirror_user_idmirrormr_default_target_selfnameoperations_access_levelonly_allow_merge_if_all_discussions_are_resolvedonly_allow_merge_if_pipeline_succeedsonly_mirror_protected_branchespackages_enabledpages_access_levelrequirements_access_levelrestrict_user_defined_variablespathpublic_buildsreleases_access_levelenvironments_access_levelfeature_flags_access_levelinfrastructure_access_levelmonitor_access_levelremove_source_branch_after_mergerepository_access_levelrepository_storagerequest_access_enabledresolve_outdated_diff_discussionssecurity_and_compliance_access_levelservice_desk_enabledshared_runners_enabledshow_default_award_emojissnippets_access_levelsnippets_enabledissue_branch_templatesquash_commit_templatesquash_optionsuggestion_commit_messagetag_listtopicsvisibilitywiki_access_levelwiki_enabled
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- import_bitbucket_server(bitbucket_server_url: str, bitbucket_server_username: str, personal_access_token: str, bitbucket_server_project: str, bitbucket_server_repo: str, new_name: str | None = None, target_namespace: str | None = None, **kwargs: Any) dict[str, Any] | Response¶
Import a project from BitBucket Server to Gitlab (schedule the import)
This method will return when an import operation has been safely queued, or an error has occurred. After triggering an import, check the
import_statusof the newly created project to detect when the import operation has completed.Note
This request may take longer than most other API requests. So this method will specify a 60 second default timeout if none is specified. A timeout can be specified via kwargs to override this functionality.
- Parameters:
bitbucket_server_url (str) – Bitbucket Server URL
bitbucket_server_username (str) – Bitbucket Server Username
personal_access_token (str) – Bitbucket Server personal access token/password
bitbucket_server_project (str) – Bitbucket Project Key
bitbucket_server_repo (str) – Bitbucket Repository Name
new_name (str | None) – New repository name (Optional)
target_namespace (str | None) – Namespace to import repository into. Supports subgroups like /namespace/subgroup (Optional)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server failed to perform the request
- Returns:
A representation of the import status.
- Return type:
dict[str, Any] | Response
Example:
gl = gitlab.Gitlab_from_config() print("Triggering import") result = gl.projects.import_bitbucket_server( bitbucket_server_url="https://some.server.url", bitbucket_server_username="some_bitbucket_user", personal_access_token="my_password_or_access_token", bitbucket_server_project="my_project", bitbucket_server_repo="my_repo", new_name="gl_project_name", target_namespace="gl_project_path" ) project = gl.projects.get(ret['id']) print("Waiting for import to complete") while project.import_status == u'started': time.sleep(1.0) project = gl.projects.get(project.id) print("BitBucket import complete")
- import_github(personal_access_token: str, repo_id: int, target_namespace: str, new_name: str | None = None, github_hostname: str | None = None, optional_stages: dict[str, bool] | None = None, **kwargs: Any) dict[str, Any] | Response¶
Import a project from Github to Gitlab (schedule the import)
This method will return when an import operation has been safely queued, or an error has occurred. After triggering an import, check the
import_statusof the newly created project to detect when the import operation has completed.Note
This request may take longer than most other API requests. So this method will specify a 60 second default timeout if none is specified. A timeout can be specified via kwargs to override this functionality.
- Parameters:
personal_access_token (str) – GitHub personal access token
repo_id (int) – Github repository ID
target_namespace (str) – Namespace to import repo into
new_name (str | None) – New repo name (Optional)
github_hostname (str | None) – Custom GitHub Enterprise hostname. Do not set for GitHub.com. (Optional)
optional_stages (dict[str, bool] | None) – Additional items to import. (Optional)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server failed to perform the request
- Returns:
A representation of the import status.
- Return type:
dict[str, Any] | Response
Example:
gl = gitlab.Gitlab_from_config() print("Triggering import") result = gl.projects.import_github(ACCESS_TOKEN, 123456, "my-group/my-subgroup") project = gl.projects.get(ret['id']) print("Waiting for import to complete") while project.import_status == u'started': time.sleep(1.0) project = gl.projects.get(project.id) print("Github import complete")
- import_project(file: BufferedReader, path: str, name: str | None = None, namespace: str | None = None, overwrite: bool = False, override_params: dict[str, Any] | None = None, **kwargs: Any) dict[str, Any] | Response¶
Import a project from an archive file.
- Parameters:
file (BufferedReader) – Data or file object containing the project
path (str) – Name and path for the new project
name (str | None) – The name of the project to import. If not provided, defaults to the path of the project.
namespace (str | None) – The ID or path of the namespace that the project will be imported to
overwrite (bool) – If True overwrite an existing project with the same path
override_params (dict[str, Any] | None) – Set the specific settings for the project
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabImportError – If the server failed to perform the request
- Returns:
A representation of the import status.
- Return type:
dict[str, Any] | Response
- remote_import(url: str, path: str, name: str | None = None, namespace: str | None = None, overwrite: bool = False, override_params: dict[str, Any] | None = None, **kwargs: Any) dict[str, Any] | Response¶
Import a project from an archive file stored on a remote URL.
- Parameters:
url (str) – URL for the file containing the project data to import
path (str) – Name and path for the new project
name (str | None) – The name of the project to import. If not provided, defaults to the path of the project.
namespace (str | None) – The ID or path of the namespace that the project will be imported to
overwrite (bool) – If True overwrite an existing project with the same path
override_params (dict[str, Any] | None) – Set the specific settings for the project
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabImportError – If the server failed to perform the request
- Returns:
A representation of the import status.
- Return type:
dict[str, Any] | Response
- remote_import_s3(path: str, region: str, bucket_name: str, file_key: str, access_key_id: str, secret_access_key: str, name: str | None = None, namespace: str | None = None, overwrite: bool = False, override_params: dict[str, Any] | None = None, **kwargs: Any) dict[str, Any] | Response¶
Import a project from an archive file stored on AWS S3.
- Parameters:
region (str) – AWS S3 region name where the file is stored
bucket_name (str) – AWS S3 bucket name where the file is stored
file_key (str) – AWS S3 file key to identify the file.
access_key_id (str) – AWS S3 access key ID.
secret_access_key (str) – AWS S3 secret access key.
path (str) – Name and path for the new project
name (str | None) – The name of the project to import. If not provided, defaults to the path of the project.
namespace (str | None) – The ID or path of the namespace that the project will be imported to
overwrite (bool) – If True overwrite an existing project with the same path
override_params (dict[str, Any] | None) – Set the specific settings for the project
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabImportError – If the server failed to perform the request
- Returns:
A representation of the import status.
- Return type:
dict[str, Any] | Response
- class gitlab.v4.objects.ProjectMember(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMemberAll(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMemberAllManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectMemberAll]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMemberManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectMember]Object Creation
Required attributes for object create:
access_level
Optional attributes for object create:
expires_attasks_to_be_done
Mutually exclusive attributes for object create:
usernameuser_id
Object update
Required attributes for object update:
access_level
Optional attributes for object update:
expires_at
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequest(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SubscribableMixin,TodoMixin,TimeTrackingMixin,ParticipantsMixin,SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- approval_rules: ProjectMergeRequestApprovalRuleManager¶
- approval_state: ProjectMergeRequestApprovalStateManager¶
- approvals: ProjectMergeRequestApprovalManager¶
- approve(sha: str | None = None, **kwargs: Any) dict[str, Any]¶
Approve the merge request.
- Parameters:
sha (str | None) – Head SHA of MR
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabMRApprovalError – If the approval failed
- Returns:
A dict containing the result.
- Return type:
dict[str, Any]
https://docs.gitlab.com/ee/api/merge_request_approvals.html#approve-merge-request
- awardemojis: ProjectMergeRequestAwardEmojiManager¶
- cancel_merge_when_pipeline_succeeds(**kwargs: Any) dict[str, str]¶
Cancel merge when the pipeline succeeds.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabMROnBuildSuccessError – If the server could not handle the request
- Returns:
dict of the parsed json returned by the server
- Return type:
dict[str, str]
- closes_issues(**kwargs: Any) RESTObjectList[ProjectIssue]¶
List issues that will close on merge.”
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
List of issues
- Return type:
- commits(**kwargs: Any) RESTObjectList[ProjectCommit]¶
List the merge request commits.
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
The list of commits
- Return type:
- discussions: ProjectMergeRequestDiscussionManager¶
- draft_notes: ProjectMergeRequestDraftNoteManager¶
- merge(merge_commit_message: str | None = None, should_remove_source_branch: bool | None = None, merge_when_pipeline_succeeds: bool | None = None, **kwargs: Any) dict[str, Any]¶
Accept the merge request.
- Parameters:
merge_commit_message (str | None) – Commit message
should_remove_source_branch (bool | None) – If True, removes the source branch
merge_when_pipeline_succeeds (bool | None) – Wait for the build to succeed, then merge
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabMRClosedError – If the merge failed
- Return type:
dict[str, Any]
- merge_ref(**kwargs: Any) dict[str, Any] | Response¶
- Attempt to merge changes between source and target branches into
refs/merge-requests/:iid/merge.
- pipelines: ProjectMergeRequestPipelineManager¶
- rebase(**kwargs: Any) dict[str, Any] | Response¶
Attempt to rebase the source branch onto the target branch
List issues related to this merge request.”
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
List of issues
- Return type:
- resourcelabelevents: ProjectMergeRequestResourceLabelEventManager¶
- resourcemilestoneevents: ProjectMergeRequestResourceMilestoneEventManager¶
- resourcestateevents: ProjectMergeRequestResourceStateEventManager¶
- reviewer_details: ProjectMergeRequestReviewerDetailManager¶
- status_checks: ProjectMergeRequestStatusCheckManager¶
- unapprove(**kwargs: Any) None¶
Unapprove the merge request.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabMRApprovalError – If the unapproval failed
- Return type:
None
https://docs.gitlab.com/ee/api/merge_request_approvals.html#unapprove-merge-request
- class gitlab.v4.objects.ProjectMergeRequestApproval(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestApprovalManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectMergeRequestApproval],UpdateMixin[ProjectMergeRequestApproval]Object Creation
Object update
Required attributes for object update:
approvals_required
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- set_approvers(approvals_required: int, approver_ids: list[int] | None = None, approver_group_ids: list[int] | None = None, approval_rule_name: str = 'name', *, approver_usernames: list[str] | None = None, **kwargs: Any) RESTObject¶
Change MR-level allowed approvers and approver groups.
- Parameters:
approvals_required (int) – The number of required approvals for this rule
approver_ids (list[int] | None) – User IDs that can approve MRs
approver_group_ids (list[int] | None) – Group IDs whose members can approve MRs
approval_rule_name (str)
approver_usernames (list[str] | None)
kwargs (Any)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUpdateError – If the server failed to perform the request
- Return type:
- class gitlab.v4.objects.ProjectMergeRequestApprovalRule(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestApprovalRuleManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectMergeRequestApprovalRule]Object Creation
Required attributes for object create:
nameapprovals_required
Optional attributes for object create:
approval_project_rule_iduser_idsgroup_idsusernames
Object update
Required attributes for object update:
idmerge_request_iidnameapprovals_required
Optional attributes for object update:
user_idsgroup_idsusernames
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestApprovalState(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestApprovalStateManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectMergeRequestApprovalState]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestAwardEmoji(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestAwardEmojiManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[ProjectMergeRequestAwardEmoji]Object Creation
Required attributes for object create:
name
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestDiff(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestDiffManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectMergeRequestDiff]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestDiscussion(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestDiscussionManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectMergeRequestDiscussion],CreateMixin[ProjectMergeRequestDiscussion],UpdateMixin[ProjectMergeRequestDiscussion]Object Creation
Required attributes for object create:
body
Optional attributes for object create:
created_atposition
Object update
Required attributes for object update:
resolved
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestDiscussionNote(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestDiscussionNoteManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectMergeRequestDiscussionNote]Object Creation
Required attributes for object create:
body
Optional attributes for object create:
created_at
Object update
Required attributes for object update:
body
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestDraftNote(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestDraftNoteManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectMergeRequestDraftNote]Object Creation
Required attributes for object create:
note
Optional attributes for object create:
commit_idin_reply_to_discussion_idpositionresolve_discussion
Object update
Optional attributes for object update:
position
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectMergeRequest]Object listing filters
stateorder_bysortmilestoneviewlabelscreated_aftercreated_beforeupdated_afterupdated_beforescopeiidsauthor_idassignee_idapprover_idsapproved_by_idsmy_reaction_emojisource_branchtarget_branchsearchwip
Object Creation
Required attributes for object create:
source_branchtarget_branchtitle
Optional attributes for object create:
allow_collaborationallow_maintainer_to_pushapprovals_before_mergeassignee_idassignee_idsdescriptionlabelsmilestone_idremove_source_branchreviewer_idssquashtarget_project_id
Object update
Optional attributes for object update:
target_branchassignee_idtitledescriptionstate_eventlabelsmilestone_idremove_source_branchdiscussion_lockedallow_maintainer_to_pushsquashreviewer_ids
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestNote(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- awardemojis: ProjectMergeRequestNoteAwardEmojiManager¶
- class gitlab.v4.objects.ProjectMergeRequestNoteAwardEmoji(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestNoteAwardEmojiManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[ProjectMergeRequestNoteAwardEmoji]Object Creation
Required attributes for object create:
name
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestNoteManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectMergeRequestNote]Object Creation
Required attributes for object create:
body
Object update
Required attributes for object update:
body
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestPipeline(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestPipelineManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[ProjectMergeRequestPipeline],ListMixin[ProjectMergeRequestPipeline]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestResourceLabelEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestResourceLabelEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectMergeRequestResourceLabelEvent]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestResourceMilestoneEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestResourceMilestoneEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectMergeRequestResourceMilestoneEvent]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestResourceStateEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestResourceStateEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectMergeRequestResourceStateEvent]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestReviewerDetail(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestReviewerDetailManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectMergeRequestReviewerDetail]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestStatusCheck(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestStatusCheckManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectMergeRequestStatusCheck]Object Creation
Object update
Required attributes for object update:
shaexternal_status_check_idstatus
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeRequestTemplate(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeRequestTemplateManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectMergeRequestTemplate]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMergeTrain(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectMergeTrainManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectMergeTrain]Object listing filters
scope
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectMilestone(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
PromoteMixin,SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- issues(**kwargs: Any) RESTObjectList[ProjectIssue]¶
List issues related to this milestone.
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
The list of issues
- Return type:
- merge_requests(**kwargs: Any) RESTObjectList[ProjectMergeRequest]¶
List the merge requests related to this milestone.
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the list could not be retrieved
- Returns:
The list of merge requests
- Return type:
- class gitlab.v4.objects.ProjectMilestoneManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectMilestone]Object listing filters
iidsstatesearch
Object Creation
Required attributes for object create:
title
Optional attributes for object create:
descriptiondue_datestart_datestate_event
Object update
Optional attributes for object update:
titledescriptiondue_datestart_datestate_event
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectNote(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectNoteManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectNote]Object Creation
Required attributes for object create:
body
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectNotificationSettings(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
NotificationSettings- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectNotificationSettingsManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NotificationSettingsManagerObject Creation
Object update
Optional attributes for object update:
levelnotification_emailnew_notenew_issuereopen_issueclose_issuereassign_issuenew_merge_requestreopen_merge_requestclose_merge_requestreassign_merge_requestmerge_merge_request
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPackage(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- package_files: ProjectPackageFileManager¶
- pipelines: ProjectPackagePipelineManager¶
- class gitlab.v4.objects.ProjectPackageFile(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPackageFileManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
DeleteMixin[ProjectPackageFile],ListMixin[ProjectPackageFile]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPackageManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectPackage],GetMixin[ProjectPackage],DeleteMixin[ProjectPackage]Object listing filters
order_bysortpackage_typepackage_namepackage_versioninclude_versionlessstatus
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPackagePipeline(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPackagePipelineManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectPackagePipeline]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPackageProtectionRule(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPackageProtectionRuleManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectPackageProtectionRule],CreateMixin[ProjectPackageProtectionRule],DeleteMixin[ProjectPackageProtectionRule],UpdateMixin[ProjectPackageProtectionRule]Object Creation
Required attributes for object create:
package_name_patternpackage_typeminimum_access_level_for_push
Object update
Optional attributes for object update:
package_name_patternpackage_typeminimum_access_level_for_push
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPages(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RefreshMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPagesDomain(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPagesDomainManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectPagesDomain]Object Creation
Required attributes for object create:
domain
Optional attributes for object create:
certificatekey
Object update
Optional attributes for object update:
certificatekey
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPagesManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
DeleteMixin[ProjectPages],UpdateMixin[ProjectPages],GetWithoutIdMixin[ProjectPages]Object Creation
Object update
Optional attributes for object update:
pages_unique_domain_enabledpages_https_only
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPipeline(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- bridges: ProjectPipelineBridgeManager¶
- test_report: ProjectPipelineTestReportManager¶
- test_report_summary: ProjectPipelineTestReportSummaryManager¶
- variables: ProjectPipelineVariableManager¶
- class gitlab.v4.objects.ProjectPipelineBridge(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPipelineBridgeManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectPipelineBridge]Object listing filters
scope
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPipelineJob(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPipelineJobManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectPipelineJob]Object listing filters
scopeinclude_retried
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPipelineManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectPipeline],CreateMixin[ProjectPipeline],DeleteMixin[ProjectPipeline]Object listing filters
scopestatussourcerefshayaml_errorsnameusernameorder_bysort
Object Creation
Required attributes for object create:
ref
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- create(data: dict[str, Any] | None = None, **kwargs: Any) ProjectPipeline¶
Creates a new object.
- Parameters:
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Returns:
- A new instance of the managed object class build with
the data sent by the server
- Return type:
- latest(ref: str | None = None, lazy: bool = False) ProjectPipeline¶
- Get the latest pipeline for the most recent commit
on a specific ref in a project
- Parameters:
ref (str | None) – The branch or tag to check for the latest pipeline. Defaults to the default branch when not specified.
lazy (bool)
- Returns:
A Pipeline instance
- Return type:
- class gitlab.v4.objects.ProjectPipelineSchedule(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- pipelines: ProjectPipelineSchedulePipelineManager¶
- play(**kwargs: Any) dict[str, Any]¶
Trigger a new scheduled pipeline, which runs immediately. The next scheduled run of this pipeline is not affected.
- take_ownership(**kwargs: Any) None¶
Update the owner of a pipeline schedule.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabOwnershipError – If the request failed
- Return type:
None
- variables: ProjectPipelineScheduleVariableManager¶
- class gitlab.v4.objects.ProjectPipelineScheduleManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectPipelineSchedule]Object Creation
Required attributes for object create:
descriptionrefcron
Optional attributes for object create:
cron_timezoneactive
Object update
Optional attributes for object update:
descriptionrefcroncron_timezoneactive
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPipelineSchedulePipeline(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPipelineSchedulePipelineManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectPipelineSchedulePipeline]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPipelineScheduleVariable(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPipelineScheduleVariableManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[ProjectPipelineScheduleVariable],UpdateMixin[ProjectPipelineScheduleVariable],DeleteMixin[ProjectPipelineScheduleVariable]Object Creation
Required attributes for object create:
keyvalue
Object update
Required attributes for object update:
keyvalue
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPipelineTestReport(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPipelineTestReportManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectPipelineTestReport]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPipelineTestReportSummary(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPipelineTestReportSummaryManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectPipelineTestReportSummary]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPipelineVariable(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPipelineVariableManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectPipelineVariable]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectProtectedBranch(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectProtectedBranchManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectProtectedBranch]Object Creation
Required attributes for object create:
name
Optional attributes for object create:
push_access_levelmerge_access_levelunprotect_access_levelallow_force_pushallowed_to_pushallowed_to_mergeallowed_to_unprotectcode_owner_approval_required
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectProtectedEnvironment(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectProtectedEnvironmentManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectProtectedEnvironment],CreateMixin[ProjectProtectedEnvironment],DeleteMixin[ProjectProtectedEnvironment]Object Creation
Required attributes for object create:
namedeploy_access_levels
Optional attributes for object create:
required_approval_countapproval_rules
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectProtectedTag(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectProtectedTagManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[ProjectProtectedTag]Object Creation
Required attributes for object create:
name
Optional attributes for object create:
create_access_level
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectPullMirror(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPullMirrorManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectPullMirror],UpdateMixin[ProjectPullMirror]Object Creation
Object update
Optional attributes for object update:
url
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- create(data: dict[str, Any], **kwargs: Any) ProjectPullMirror¶
Create a new object.
- Parameters:
- Returns:
- A new instance of the managed object class built with
the data sent by the server
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server cannot perform the request
- Return type:
- start(**kwargs: Any) None¶
Start the pull mirroring process for the project.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabCreateError – If the server failed to perform the request
- Return type:
None
- class gitlab.v4.objects.ProjectPushRules(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectPushRulesManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectPushRules],CreateMixin[ProjectPushRules],UpdateMixin[ProjectPushRules],DeleteMixin[ProjectPushRules]Object Creation
Optional attributes for object create:
author_email_regexbranch_name_regexcommit_committer_checkcommit_message_negative_regexcommit_message_regexdeny_delete_tagfile_name_regexmax_file_sizemember_checkprevent_secretsreject_unsigned_commits
Object update
Optional attributes for object update:
author_email_regexbranch_name_regexcommit_committer_checkcommit_message_negative_regexcommit_message_regexdeny_delete_tagfile_name_regexmax_file_sizemember_checkprevent_secretsreject_unsigned_commits
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectRegistryProtectionRule(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectRegistryProtectionRuleManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectRegistryProtectionRule],CreateMixin[ProjectRegistryProtectionRule],UpdateMixin[ProjectRegistryProtectionRule]Object Creation
Required attributes for object create:
repository_path_pattern
Optional attributes for object create:
minimum_access_level_for_pushminimum_access_level_for_delete
Object update
Optional attributes for object update:
repository_path_patternminimum_access_level_for_pushminimum_access_level_for_delete
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectRegistryRepository(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectRegistryRepositoryManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
DeleteMixin[ProjectRegistryRepository],ListMixin[ProjectRegistryRepository]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectRegistryRepositoryProtectionRule(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectRegistryRepositoryProtectionRuleManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectRegistryRepositoryProtectionRule],CreateMixin[ProjectRegistryRepositoryProtectionRule],UpdateMixin[ProjectRegistryRepositoryProtectionRule]Object Creation
Required attributes for object create:
repository_path_pattern
Optional attributes for object create:
minimum_access_level_for_pushminimum_access_level_for_delete
Object update
Optional attributes for object update:
repository_path_patternminimum_access_level_for_pushminimum_access_level_for_delete
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectRegistryTag(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectRegistryTagManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
DeleteMixin[ProjectRegistryTag],RetrieveMixin[ProjectRegistryTag]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- delete_in_bulk(name_regex_delete: str, **kwargs: Any) None¶
Delete Tag in bulk
- Parameters:
name_regex_delete (str) – The regex of the name to delete. To delete all tags specify .*.
keep_n – The amount of latest tags of given name to keep.
name_regex_keep – The regex of the name to keep. This value overrides any matches from name_regex.
older_than – Tags to delete that are older than the given time, written in human readable form 1h, 1d, 1month.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server cannot perform the request
- Return type:
None
- class gitlab.v4.objects.ProjectRelease(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- links: ProjectReleaseLinkManager¶
- class gitlab.v4.objects.ProjectReleaseLink(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectReleaseLinkManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectReleaseLink]Object Creation
Required attributes for object create:
nameurl
Optional attributes for object create:
filepathdirect_asset_pathlink_type
Object update
Optional attributes for object update:
nameurlfilepathdirect_asset_pathlink_type
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectReleaseManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectRelease]Object listing filters
order_bysortinclude_html_description
Object Creation
Required attributes for object create:
tag_name
Optional attributes for object create:
namedescriptionrefassets
Object update
Optional attributes for object update:
namedescriptionmilestonesreleased_at
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectRemoteMirror(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectRemoteMirrorManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectRemoteMirror],CreateMixin[ProjectRemoteMirror],UpdateMixin[ProjectRemoteMirror],DeleteMixin[ProjectRemoteMirror]Object Creation
Required attributes for object create:
url
Optional attributes for object create:
enabledonly_protected_branches
Object update
Optional attributes for object update:
enabledonly_protected_branches
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectResourceGroup(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- upcoming_jobs: ProjectResourceGroupUpcomingJobManager¶
- class gitlab.v4.objects.ProjectResourceGroupManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectResourceGroup],UpdateMixin[ProjectResourceGroup]Object listing filters
order_bysortinclude_html_description
Object Creation
Object update
Optional attributes for object update:
process_mode
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectResourceGroupUpcomingJob(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectResourceGroupUpcomingJobManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectResourceGroupUpcomingJob]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectRunner(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectRunnerManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[ProjectRunner],DeleteMixin[ProjectRunner],ListMixin[ProjectRunner]Object listing filters
scopetag_list
Object Creation
Required attributes for object create:
runner_id
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectSecureFile(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- download(streamed: bool = False, action: Callable[[bytes], Any] | None = None, chunk_size: int = 1024, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Download the secure file.
- Parameters:
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
iterator (bool) – If True directly return the underlying response iterator
action (Callable[[bytes], Any] | None) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the artifacts could not be retrieved
- Returns:
The artifacts if streamed is False, None otherwise.
- Return type:
bytes | Iterator[Any] | None
- class gitlab.v4.objects.ProjectSecureFileManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[ProjectSecureFile]Object Creation
Required attributes for object create:
namefile
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectService(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ProjectIntegration- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectServiceManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ProjectIntegrationManagerObject Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectSnippet(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
UserAgentDetailMixin,SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- awardemojis: ProjectSnippetAwardEmojiManager¶
- content(streamed: bool = False, action: Callable[[...], Any] | None = None, chunk_size: int = 1024, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Return the content of a snippet.
- Parameters:
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment.
iterator (bool) – If True directly return the underlying response iterator
action (Callable[[...], Any] | None) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the content could not be retrieved
- Returns:
The snippet content
- Return type:
bytes | Iterator[Any] | None
- discussions: ProjectSnippetDiscussionManager¶
- notes: ProjectSnippetNoteManager¶
- class gitlab.v4.objects.ProjectSnippetAwardEmoji(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectSnippetAwardEmojiManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[ProjectSnippetAwardEmoji]Object Creation
Required attributes for object create:
name
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectSnippetDiscussion(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectSnippetDiscussionManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[ProjectSnippetDiscussion],CreateMixin[ProjectSnippetDiscussion]Object Creation
Required attributes for object create:
body
Optional attributes for object create:
created_at
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectSnippetDiscussionNote(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectSnippetDiscussionNoteManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetMixin[ProjectSnippetDiscussionNote],CreateMixin[ProjectSnippetDiscussionNote],UpdateMixin[ProjectSnippetDiscussionNote],DeleteMixin[ProjectSnippetDiscussionNote]Object Creation
Required attributes for object create:
body
Optional attributes for object create:
created_at
Object update
Required attributes for object update:
body
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectSnippetManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectSnippet]Object Creation
Required attributes for object create:
titlevisibility
Optional attributes for object create:
descriptioncontent
Mutually exclusive attributes for object create:
filesfile_name
Object update
Optional attributes for object update:
titlefilesfile_namecontentvisibilitydescription
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectSnippetNote(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- awardemojis: ProjectSnippetNoteAwardEmojiManager¶
- class gitlab.v4.objects.ProjectSnippetNoteAwardEmoji(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectSnippetNoteAwardEmojiManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[ProjectSnippetNoteAwardEmoji]Object Creation
Required attributes for object create:
name
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectSnippetNoteManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectSnippetNote]Object Creation
Required attributes for object create:
body
Object update
Required attributes for object update:
body
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectStorage(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RefreshMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectStorageManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[ProjectStorage]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectTag(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectTagManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[ProjectTag]Object listing filters
order_bysortsearch
Object Creation
Required attributes for object create:
tag_nameref
Optional attributes for object create:
message
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectTrigger(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectTriggerManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectTrigger]Object Creation
Required attributes for object create:
description
Object update
Required attributes for object update:
description
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectUser(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectUserManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[ProjectUser]Object listing filters
searchskip_users
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectVariable(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectVariableManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectVariable]Object Creation
Required attributes for object create:
keyvalue
Optional attributes for object create:
protectedvariable_typemaskedenvironment_scope
Object update
Required attributes for object update:
keyvalue
Optional attributes for object update:
protectedvariable_typemaskedenvironment_scope
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.ProjectWiki(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,UploadMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.ProjectWikiManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CRUDMixin[ProjectWiki]Object listing filters
with_content
Object Creation
Required attributes for object create:
titlecontent
Optional attributes for object create:
format
Object update
Optional attributes for object update:
titlecontentformat
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.RegistryRepository(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.RegistryRepositoryManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetMixin[RegistryRepository]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.RepositoryMixin¶
Bases:
object- delete_merged_branches(**kwargs: Any) None¶
Delete merged branches.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabDeleteError – If the server failed to perform the request
- Return type:
None
- repository_archive(sha: str | None = None, streamed: bool = False, action: Callable[[...], Any] | None = None, chunk_size: int = 1024, format: str | None = None, path: str | None = None, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Return an archive of the repository.
- Parameters:
sha (str | None) – ID of the commit (default branch by default)
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
iterator (bool) – If True directly return the underlying response iterator
action (Callable[[...], Any] | None) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
format (str | None) – file format (tar.gz by default)
path (str | None) – The subpath of the repository to download (all files by default)
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server failed to perform the request
- Returns:
The binary data of the archive
- Return type:
bytes | Iterator[Any] | None
- repository_blob(sha: str, **kwargs: Any) dict[str, Any] | Response¶
Return a file by blob SHA.
- Parameters:
sha (str) – ID of the blob
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The blob content and metadata
- Return type:
dict[str, Any] | Response
- repository_compare(from_: str, to: str, **kwargs: Any) dict[str, Any] | Response¶
Return a diff between two branches/commits.
- Parameters:
from – Source branch/SHA
to (str) – Destination branch/SHA
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
from_ (str)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The diff
- Return type:
dict[str, Any] | Response
- repository_contributors(**kwargs: Any) GitlabList | list[dict[str, Any]]¶
Return a list of contributors for the project.
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
iterator – If set to True and no pagination option is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The contributors
- Return type:
GitlabList | list[dict[str, Any]]
- repository_merge_base(refs: list[str], **kwargs: Any) dict[str, Any] | Response¶
Return a diff between two branches/commits.
- Parameters:
refs (list[str]) – The refs to find the common ancestor of. Multiple refs can be passed.
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The common ancestor commit (not a RESTObject)
- Return type:
dict[str, Any] | Response
- repository_raw_blob(sha: str, streamed: bool = False, action: Callable[[...], Any] | None = None, chunk_size: int = 1024, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Return the raw file contents for a blob.
- Parameters:
sha (str) – ID of the blob
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment
iterator (bool) – If True directly return the underlying response iterator
action (Callable[[...], Any] | None) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The blob content if streamed is False, None otherwise
- Return type:
bytes | Iterator[Any] | None
- repository_tree(path: str = '', ref: str = '', recursive: bool = False, **kwargs: Any) GitlabList | list[dict[str, Any]]¶
Return a list of files in the repository.
- Parameters:
path (str) – Path of the top folder (/ by default)
ref (str) – Reference to a commit or branch
recursive (bool) – Whether to get the tree recursively
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
iterator – If set to True and no pagination option is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the server failed to perform the request
- Returns:
The representation of the tree
- Return type:
GitlabList | list[dict[str, Any]]
- update_submodule(submodule: str, branch: str, commit_sha: str, **kwargs: Any) dict[str, Any] | Response¶
Update a project submodule
- Parameters:
submodule (str) – Full path to the submodule
branch (str) – Name of the branch to commit into
commit_sha (str) – Full commit SHA to update the submodule to
commit_message – Commit message. If no message is provided, a default one will be set (optional)
kwargs (Any)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabPutError – If the submodule could not be updated
- Return type:
dict[str, Any] | Response
- class gitlab.v4.objects.Runner(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- jobs: RunnerJobManager¶
- class gitlab.v4.objects.RunnerAll(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.RunnerAllManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object listing filters
scopetypestatuspausedtag_list
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.RunnerJob(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.RunnerJobManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object listing filters
status
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.RunnerManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object listing filters
scopetypestatuspausedtag_list
Object Creation
Required attributes for object create:
token
Optional attributes for object create:
descriptioninfoactivelockedrun_untaggedtag_listaccess_levelmaximum_timeout
Object update
Optional attributes for object update:
descriptionactivetag_listrun_untaggedlockedaccess_levelmaximum_timeout
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- all(scope: str | None = None, **kwargs: Any) list[Runner]¶
List all the runners.
- Parameters:
scope (str | None) – The scope of runners to show, one of: specific, shared, active, paused, online
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
iterator – If set to True and no pagination option is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server failed to perform the request
- Returns:
A list of runners matching the scope.
- Return type:
list[Runner]
- verify(token: str, **kwargs: Any) None¶
Validates authentication credentials for a registered Runner.
- Parameters:
token (str) – The runner’s authentication token
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabVerifyError – If the server failed to verify the token
- Return type:
None
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
Bases:
ListMixin[SharedProject]Object listing filters
archivedvisibilityorder_bysortsearchsimplestarredwith_issues_enabledwith_merge_requests_enabledmin_access_levelwith_custom_attributes
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.SidekiqManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RESTManager[RESTObject]Manager for the Sidekiq methods.
This manager doesn’t actually manage objects but provides helper function for the sidekiq metrics API.
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- compound_metrics(**kwargs: Any) dict[str, Any] | Response¶
Return all available metrics and statistics.
- class gitlab.v4.objects.Snippet(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
UserAgentDetailMixin,SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- content(streamed: bool = False, action: Callable[[...], Any] | None = None, chunk_size: int = 1024, *, iterator: bool = False, **kwargs: Any) bytes | Iterator[Any] | None¶
Return the content of a snippet.
- Parameters:
streamed (bool) – If True the data will be processed by chunks of chunk_size and each chunk is passed to action for treatment.
iterator (bool) – If True directly return the underlying response iterator
action (Callable[[...], Any] | None) – Callable responsible of dealing with chunk of data
chunk_size (int) – Size of each chunk
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabGetError – If the content could not be retrieved
- Returns:
The snippet content
- Return type:
bytes | Iterator[Any] | None
- class gitlab.v4.objects.SnippetManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object Creation
Required attributes for object create:
title
Optional attributes for object create:
descriptioncontentvisibility
Mutually exclusive attributes for object create:
filesfile_name
Object update
Optional attributes for object update:
titlefilesfile_namecontentvisibilitydescription
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- list_all(*, iterator: bool = False, **kwargs: Any) RESTObjectList[Snippet] | list[Snippet]¶
List all snippets.
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
iterator (bool) – If set to True and no pagination option is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabListError – If the list could not be retrieved
- Returns:
A generator for the snippets list
- Return type:
RESTObjectList[Snippet] | list[Snippet]
- list_public(*, iterator: bool = False, **kwargs: Any) RESTObjectList[Snippet] | list[Snippet]¶
List all public snippets.
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
iterator (bool) – If set to True and no pagination option is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabListError – If the list could not be retrieved
- Returns:
The list of snippets, or a generator if iterator is True
- Return type:
RESTObjectList[Snippet] | list[Snippet]
- public(*, iterator: bool = False, **kwargs: Any) RESTObjectList[Snippet] | list[Snippet]¶
List all public snippets.
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
iterator (bool) – If set to True and no pagination option is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabListError – If the list could not be retrieved
- Returns:
The list of snippets, or a generator if iterator is True
- Return type:
RESTObjectList[Snippet] | list[Snippet]
- class gitlab.v4.objects.StarredProject(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.StarredProjectManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[StarredProject]Object listing filters
archivedmembershipmin_access_levelorder_byownedsearchsimplesortstarredstatisticsvisibilitywith_custom_attributeswith_issues_enabledwith_merge_requests_enabled
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.Todo(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.TodoManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[Todo],DeleteMixin[Todo]Object listing filters
actionauthor_idproject_idstatetype
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- mark_all_as_done(**kwargs: Any) None¶
Mark all the todos as done.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabTodoError – If the server failed to perform the request
- Returns:
The number of todos marked done
- Return type:
None
- class gitlab.v4.objects.Topic(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.TopicManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object Creation
Required attributes for object create:
name
Optional attributes for object create:
avatardescriptiontitle
Object update
Optional attributes for object update:
avatardescriptionname
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- merge(source_topic_id: int | str, target_topic_id: int | str, **kwargs: Any) dict[str, Any]¶
Merge two topics, assigning all projects to the target topic.
- Parameters:
source_topic_id (int | str) – ID of source project topic
target_topic_id (int | str) – ID of target project topic
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabTopicMergeError – If the merge failed
- Returns:
The merged topic data (not a RESTObject)
- Return type:
dict[str, Any]
- class gitlab.v4.objects.User(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- block(**kwargs: Any) bool | None¶
Block the user.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabBlockError – If the user could not be blocked
- Returns:
Whether the user status has been changed
- Return type:
bool | None
- contributed_projects: UserContributedProjectManager¶
- customattributes: UserCustomAttributeManager¶
- emails: UserEmailManager¶
- events: UserEventManager¶
- followers_users: UserFollowersManager¶
- following_users: UserFollowingManager¶
- gpgkeys: UserGPGKeyManager¶
- identityproviders: UserIdentityProviderManager¶
- impersonationtokens: UserImpersonationTokenManager¶
- keys: UserKeyManager¶
- memberships: UserMembershipManager¶
- personal_access_tokens: UserPersonalAccessTokenManager¶
- projects: UserProjectManager¶
- starred_projects: StarredProjectManager¶
- status: UserStatusManager¶
- unblock(**kwargs: Any) bool | None¶
Unblock the user.
- Parameters:
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabUnblockError – If the user could not be unblocked
- Returns:
Whether the user status has been changed
- Return type:
bool | None
- class gitlab.v4.objects.UserActivities(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.UserActivitiesManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[UserActivities]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.UserContributedProject(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.UserContributedProjectManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[UserContributedProject]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.UserCustomAttribute(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.UserCustomAttributeManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[UserCustomAttribute],SetMixin[UserCustomAttribute],DeleteMixin[UserCustomAttribute]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.UserEmail(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.UserEmailManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[UserEmail],CreateMixin[UserEmail],DeleteMixin[UserEmail]Object Creation
Required attributes for object create:
email
Optional attributes for object create:
skip_confirmation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.UserEvent(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
Event- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.UserEventManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
EventManagerObject listing filters
actiontarget_typebeforeaftersortscope
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.UserGPGKey(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.UserGPGKeyManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[UserGPGKey],CreateMixin[UserGPGKey],DeleteMixin[UserGPGKey]Object Creation
Required attributes for object create:
key
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.UserIdentityProviderManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
DeleteMixin[User]Manager for user identities.
This manager does not actually manage objects but enables functionality for deletion of user identities by provider.
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.UserImpersonationToken(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.UserImpersonationTokenManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
NoUpdateMixin[UserImpersonationToken]Object listing filters
state
Object Creation
Required attributes for object create:
namescopes
Optional attributes for object create:
expires_at
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.UserKey(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.UserKeyManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[UserKey],CreateMixin[UserKey],DeleteMixin[UserKey]Object Creation
Required attributes for object create:
titlekey
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.UserManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object listing filters
usernamepublic_emailsearchactiveexternalblockedhumanscreated_aftercreated_beforeexclude_activeexclude_externalexclude_humansexclude_internalwithout_project_botsextern_uidprovidertwo_factorwithout_projectsadminsauditorsskip_ldapcustom_attributesstatus
Object Creation
Optional attributes for object create:
emailusernamenamepasswordreset_passwordskypelinkedintwitterprojects_limitextern_uidproviderbioadmincan_create_groupwebsite_urlskip_confirmationexternalorganizationlocationavatarpublic_emailprivate_profilecolor_scheme_idtheme_id
Object update
Required attributes for object update:
emailusernamename
Optional attributes for object update:
passwordskypelinkedintwitterprojects_limitextern_uidproviderbioadmincan_create_groupwebsite_urlskip_reconfirmationexternalorganizationlocationavatarpublic_emailprivate_profilecolor_scheme_idtheme_id
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.UserMembership(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.UserMembershipManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
RetrieveMixin[UserMembership]Object listing filters
type
Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.UserPersonalAccessToken(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.UserPersonalAccessTokenManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
CreateMixin[UserPersonalAccessToken]Object Creation
Required attributes for object create:
namescopes
Optional attributes for object create:
expires_at
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.UserProject(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.UserProjectManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
ListMixin[UserProject],CreateMixin[UserProject]Object listing filters
archivedvisibilityorder_bysortsearchsimpleownedmembershipstarredstatisticswith_issues_enabledwith_merge_requests_enabledwith_custom_attributeswith_programming_languagewiki_checksum_failedrepository_checksum_failedmin_access_levelid_afterid_before
Object Creation
Required attributes for object create:
name
Optional attributes for object create:
default_branchissues_enabledwall_enabledmerge_requests_enabledwiki_enabledsnippets_enabledsquash_optionpublicvisibilitydescriptionbuilds_enabledpublic_buildsimport_urlonly_allow_merge_if_build_succeeds
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- list(*, iterator: bool = False, **kwargs: Any) RESTObjectList[UserProject] | list[UserProject]¶
Retrieve a list of objects.
- Parameters:
get_all – If True, return all the items, without pagination
per_page – Number of items to retrieve per request
page – ID of the page to return (starts with page 1)
iterator (bool) – If set to True and no pagination option is defined, return a generator instead of a list
**kwargs (Any) – Extra options to send to the server (e.g. sudo)
- Returns:
The list of objects, or a generator if iterator is True
- Raises:
GitlabAuthenticationError – If authentication is not correct
GitlabListError – If the server cannot perform the request
- Return type:
- class gitlab.v4.objects.UserStatus(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.UserStatusManager(gl: Gitlab, parent: RESTObject | None = None)¶
Bases:
GetWithoutIdMixin[UserStatus]Object Creation
Object update
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- class gitlab.v4.objects.Variable(manager: RESTManager[Any], attrs: dict[str, Any], *, created_from_list: bool = False, lazy: bool = False)¶
Bases:
SaveMixin,ObjectDeleteMixin,RESTObject- Parameters:
manager (RESTManager[Any])
attrs (dict[str, Any])
created_from_list (bool)
lazy (bool)
- class gitlab.v4.objects.VariableManager(gl: Gitlab, parent: RESTObject | None = None)¶
-
Object Creation
Required attributes for object create:
keyvalue
Optional attributes for object create:
protectedvariable_typemasked
Object update
Required attributes for object update:
keyvalue
Optional attributes for object update:
protectedvariable_typemasked
- Parameters:
gl (Gitlab)
parent (RESTObject | None)
- gitlab.v4.objects.overload(func)¶
Decorator for overloaded functions/methods.
In a stub file, place two or more stub definitions for the same function in a row, each decorated with @overload.
For example:
@overload def utf8(value: None) -> None: ... @overload def utf8(value: bytes) -> bytes: ... @overload def utf8(value: str) -> bytes: ...
In a non-stub file (i.e. a regular .py file), do the same but follow it with an implementation. The implementation should not be decorated with @overload:
@overload def utf8(value: None) -> None: ... @overload def utf8(value: bytes) -> bytes: ... @overload def utf8(value: str) -> bytes: ... def utf8(value): ... # implementation goes here
The overloads for a function can be retrieved at runtime using the get_overloads() function.