Repository¶
-
class
oci.devops.models.Repository(**kwargs)¶ Bases:
objectRepositories containing the source code to build and deploy.
Attributes
LIFECYCLE_STATE_ACTIVEA constant which can be used with the lifecycle_state property of a Repository. LIFECYCLE_STATE_CREATINGA constant which can be used with the lifecycle_state property of a Repository. LIFECYCLE_STATE_DELETEDA constant which can be used with the lifecycle_state property of a Repository. LIFECYCLE_STATE_DELETINGA constant which can be used with the lifecycle_state property of a Repository. LIFECYCLE_STATE_FAILEDA constant which can be used with the lifecycle_state property of a Repository. REPOSITORY_TYPE_FORKEDA constant which can be used with the repository_type property of a Repository. REPOSITORY_TYPE_HOSTEDA constant which can be used with the repository_type property of a Repository. REPOSITORY_TYPE_MIRROREDA constant which can be used with the repository_type property of a Repository. TRIGGER_BUILD_EVENTS_COMMIT_UPDATESA constant which can be used with the trigger_build_events property of a Repository. TRIGGER_BUILD_EVENTS_PULL_REQUEST_CREATEDA constant which can be used with the trigger_build_events property of a Repository. TRIGGER_BUILD_EVENTS_PULL_REQUEST_UPDATEDA constant which can be used with the trigger_build_events property of a Repository. TRIGGER_BUILD_EVENTS_PUSHA constant which can be used with the trigger_build_events property of a Repository. branch_countGets the branch_count of this Repository. commit_countGets the commit_count of this Repository. compartment_id[Required] Gets the compartment_id of this Repository. default_branchGets the default_branch of this Repository. defined_tagsGets the defined_tags of this Repository. descriptionGets the description of this Repository. freeform_tagsGets the freeform_tags of this Repository. http_urlGets the http_url of this Repository. id[Required] Gets the id of this Repository. lifecycle_stateGets the lifecycle_state of this Repository. lifecyle_detailsGets the lifecyle_details of this Repository. mirror_repository_configGets the mirror_repository_config of this Repository. nameGets the name of this Repository. namespaceGets the namespace of this Repository. parent_repository_idGets the parent_repository_id of this Repository. project_id[Required] Gets the project_id of this Repository. project_nameGets the project_name of this Repository. repository_typeGets the repository_type of this Repository. size_in_bytesGets the size_in_bytes of this Repository. ssh_urlGets the ssh_url of this Repository. system_tagsGets the system_tags of this Repository. time_createdGets the time_created of this Repository. time_updatedGets the time_updated of this Repository. trigger_build_eventsGets the trigger_build_events of this Repository. Methods
__init__(**kwargs)Initializes a new Repository object with values from keyword arguments. -
LIFECYCLE_STATE_ACTIVE= 'ACTIVE'¶ A constant which can be used with the lifecycle_state property of a Repository. This constant has a value of “ACTIVE”
-
LIFECYCLE_STATE_CREATING= 'CREATING'¶ A constant which can be used with the lifecycle_state property of a Repository. This constant has a value of “CREATING”
-
LIFECYCLE_STATE_DELETED= 'DELETED'¶ A constant which can be used with the lifecycle_state property of a Repository. This constant has a value of “DELETED”
-
LIFECYCLE_STATE_DELETING= 'DELETING'¶ A constant which can be used with the lifecycle_state property of a Repository. This constant has a value of “DELETING”
-
LIFECYCLE_STATE_FAILED= 'FAILED'¶ A constant which can be used with the lifecycle_state property of a Repository. This constant has a value of “FAILED”
-
REPOSITORY_TYPE_FORKED= 'FORKED'¶ A constant which can be used with the repository_type property of a Repository. This constant has a value of “FORKED”
-
REPOSITORY_TYPE_HOSTED= 'HOSTED'¶ A constant which can be used with the repository_type property of a Repository. This constant has a value of “HOSTED”
-
REPOSITORY_TYPE_MIRRORED= 'MIRRORED'¶ A constant which can be used with the repository_type property of a Repository. This constant has a value of “MIRRORED”
-
TRIGGER_BUILD_EVENTS_COMMIT_UPDATES= 'COMMIT_UPDATES'¶ A constant which can be used with the trigger_build_events property of a Repository. This constant has a value of “COMMIT_UPDATES”
-
TRIGGER_BUILD_EVENTS_PULL_REQUEST_CREATED= 'PULL_REQUEST_CREATED'¶ A constant which can be used with the trigger_build_events property of a Repository. This constant has a value of “PULL_REQUEST_CREATED”
-
TRIGGER_BUILD_EVENTS_PULL_REQUEST_UPDATED= 'PULL_REQUEST_UPDATED'¶ A constant which can be used with the trigger_build_events property of a Repository. This constant has a value of “PULL_REQUEST_UPDATED”
-
TRIGGER_BUILD_EVENTS_PUSH= 'PUSH'¶ A constant which can be used with the trigger_build_events property of a Repository. This constant has a value of “PUSH”
-
__init__(**kwargs)¶ Initializes a new Repository object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
Parameters: - id (str) – The value to assign to the id property of this Repository.
- name (str) – The value to assign to the name property of this Repository.
- compartment_id (str) – The value to assign to the compartment_id property of this Repository.
- namespace (str) – The value to assign to the namespace property of this Repository.
- project_id (str) – The value to assign to the project_id property of this Repository.
- parent_repository_id (str) – The value to assign to the parent_repository_id property of this Repository.
- project_name (str) – The value to assign to the project_name property of this Repository.
- ssh_url (str) – The value to assign to the ssh_url property of this Repository.
- http_url (str) – The value to assign to the http_url property of this Repository.
- description (str) – The value to assign to the description property of this Repository.
- default_branch (str) – The value to assign to the default_branch property of this Repository.
- repository_type (str) – The value to assign to the repository_type property of this Repository. Allowed values for this property are: “MIRRORED”, “HOSTED”, “FORKED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- mirror_repository_config (oci.devops.models.MirrorRepositoryConfig) – The value to assign to the mirror_repository_config property of this Repository.
- time_created (datetime) – The value to assign to the time_created property of this Repository.
- time_updated (datetime) – The value to assign to the time_updated property of this Repository.
- lifecycle_state (str) – The value to assign to the lifecycle_state property of this Repository. Allowed values for this property are: “ACTIVE”, “CREATING”, “DELETED”, “FAILED”, “DELETING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- lifecyle_details (str) – The value to assign to the lifecyle_details property of this Repository.
- branch_count (int) – The value to assign to the branch_count property of this Repository.
- commit_count (int) – The value to assign to the commit_count property of this Repository.
- size_in_bytes (int) – The value to assign to the size_in_bytes property of this Repository.
- trigger_build_events (list[str]) – The value to assign to the trigger_build_events property of this Repository. Allowed values for items in this list are: “PUSH”, “PULL_REQUEST_CREATED”, “PULL_REQUEST_UPDATED”, “COMMIT_UPDATES”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this Repository.
- defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this Repository.
- system_tags (dict(str, dict(str, object))) – The value to assign to the system_tags property of this Repository.
-
branch_count¶ Gets the branch_count of this Repository. The count of the branches present in the repository.
Returns: The branch_count of this Repository. Return type: int
-
commit_count¶ Gets the commit_count of this Repository. The count of the commits present in the repository.
Returns: The commit_count of this Repository. Return type: int
-
compartment_id¶ [Required] Gets the compartment_id of this Repository. The OCID of the repository’s compartment.
Returns: The compartment_id of this Repository. Return type: str
-
default_branch¶ Gets the default_branch of this Repository. The default branch of the repository.
Returns: The default_branch of this Repository. Return type: str
Gets the defined_tags of this Repository. Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {“foo-namespace”: {“bar-key”: “value”}}
Returns: The defined_tags of this Repository. Return type: dict(str, dict(str, object))
-
description¶ Gets the description of this Repository. Details of the repository. Avoid entering confidential information.
Returns: The description of this Repository. Return type: str
Gets the freeform_tags of this Repository. Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {“bar-key”: “value”}
Returns: The freeform_tags of this Repository. Return type: dict(str, str)
-
http_url¶ Gets the http_url of this Repository. HTTP URL that you use to git clone, pull and push.
Returns: The http_url of this Repository. Return type: str
-
id¶ [Required] Gets the id of this Repository. The OCID of the repository. This value is unique and immutable.
Returns: The id of this Repository. Return type: str
-
lifecycle_state¶ Gets the lifecycle_state of this Repository. The current state of the repository.
Allowed values for this property are: “ACTIVE”, “CREATING”, “DELETED”, “FAILED”, “DELETING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The lifecycle_state of this Repository. Return type: str
-
lifecyle_details¶ Gets the lifecyle_details of this Repository. A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
Returns: The lifecyle_details of this Repository. Return type: str
-
mirror_repository_config¶ Gets the mirror_repository_config of this Repository.
Returns: The mirror_repository_config of this Repository. Return type: oci.devops.models.MirrorRepositoryConfig
-
name¶ Gets the name of this Repository. Name of the repository. Should be unique within the project. This value is mutable.
Returns: The name of this Repository. Return type: str
-
namespace¶ Gets the namespace of this Repository. Tenancy unique namespace.
Returns: The namespace of this Repository. Return type: str
-
parent_repository_id¶ Gets the parent_repository_id of this Repository. The OCID of the parent repository.
Returns: The parent_repository_id of this Repository. Return type: str
-
project_id¶ [Required] Gets the project_id of this Repository. The OCID of the DevOps project containing the repository.
Returns: The project_id of this Repository. Return type: str
-
project_name¶ Gets the project_name of this Repository. Unique project name in a namespace.
Returns: The project_name of this Repository. Return type: str
-
repository_type¶ Gets the repository_type of this Repository. Type of repository: MIRRORED - Repository created by mirroring an existing repository. HOSTED - Repository created and hosted using OCI DevOps code repository. FORKED - Repository created by forking an existing repository.
Allowed values for this property are: “MIRRORED”, “HOSTED”, “FORKED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The repository_type of this Repository. Return type: str
-
size_in_bytes¶ Gets the size_in_bytes of this Repository. The size of the repository in bytes.
Returns: The size_in_bytes of this Repository. Return type: int
-
ssh_url¶ Gets the ssh_url of this Repository. SSH URL that you use to git clone, pull and push.
Returns: The ssh_url of this Repository. Return type: str
Gets the system_tags of this Repository. Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {“orcl-cloud”: {“free-tier-retained”: “true”}}
Returns: The system_tags of this Repository. Return type: dict(str, dict(str, object))
-
time_created¶ Gets the time_created of this Repository. The time the repository was created. Format defined by RFC3339.
Returns: The time_created of this Repository. Return type: datetime
-
time_updated¶ Gets the time_updated of this Repository. The time the repository was updated. Format defined by RFC3339.
Returns: The time_updated of this Repository. Return type: datetime
-
trigger_build_events¶ Gets the trigger_build_events of this Repository. Trigger build events supported for this repository: PUSH - Build is triggered when a push event occurs. PULL_REQUEST_CREATED - Build is triggered when a pull request is created in the repository. PULL_REQUEST_UPDATED - Build is triggered when a push is made to a branch with an open pull request. COMMIT_UPDATES - Build is triggered when new commits are mirrored into a repository.
Allowed values for items in this list are: “PUSH”, “PULL_REQUEST_CREATED”, “PULL_REQUEST_UPDATED”, “COMMIT_UPDATES”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The trigger_build_events of this Repository. Return type: list[str]
-