gitcode_api._models
Typed response models for the GitCode SDK.
Functions
|
Wrap a mapping in the requested SDK model type. |
|
Wrap a list of mappings in the requested SDK model type. |
Classes
|
Dictionary-backed wrapper around GitCode JSON objects. |
|
Simple success/error response containing a numeric code and message. |
|
Git blob payload. |
|
Repository branch payload returned by list/create endpoints. |
|
Repository branch payload returned by the detail endpoint. |
|
Commit object returned inside branch detail responses. |
|
Nested branch summary commit payload. |
|
Commit payload returned by detail endpoints. |
|
Author summary on commit/search payloads. |
|
Commit comment payload. |
|
Commit comparison payload. |
|
Commit file entry. |
|
Commit author/committer identity. |
|
Commit parent reference. |
|
Nested commit metadata. |
|
Commit result payload returned by content write operations. |
|
Commit diff stats. |
|
Commit payload returned by list endpoints. |
|
Tree reference embedded in commit summaries. |
|
Repository content link bundle. |
|
Repository content payload for files and directories. |
|
Commit object returned by content write endpoints. |
|
Contributor payload returned by repository statistics endpoints. |
|
Contributor statistics payload returned by the repository statistics endpoint. |
Per-day contributor statistics entry. |
|
Aggregate contributor statistics summary. |
|
|
Email payload for the authenticated user. |
|
Empty JSON object returned by some mutation endpoints. |
|
Enterprise member payload. |
|
Enterprise summary embedded in repository search results. |
|
Issue payload. |
|
Issue comment payload. |
|
Issue operation log payload. |
|
Label payload. |
|
Merge operation result payload. |
|
Merge status payload. |
|
Milestone payload. |
|
Namespace payload returned by the namespace lookup endpoint. |
|
Namespace object embedded in repository payloads. |
|
OAuth token payload. |
|
Organization payload. |
|
Organization membership payload. |
|
Organization summary payload returned by list endpoints. |
|
Protected branch configuration payload. |
|
Protected tag configuration payload. |
|
Public SSH key payload. |
|
Pull request payload. |
|
Approver/tester embedded in pull request responses. |
|
Response payload when assignees are added to a pull request. |
|
Head/base branch payload in pull request responses. |
|
Pull request comment payload. |
|
Pull request count payload returned when |
|
Diff refs embedded in pull requests. |
|
Pull request file diff payload. |
|
Pull request operation log entry. |
|
Pull request review payload. |
|
Nested merge request setting payload in repository PR settings. |
|
Repository pull request settings payload. |
|
Pull request test request payload. |
|
Time tracking fields embedded in pull requests. |
|
Release payload. |
|
Asset metadata embedded in release payloads. |
|
Pre-signed release attachment upload target. |
|
Repository collaborator payload returned by list operations. |
|
Repository member payload returned by add/update operations. |
|
Repository member permission payload. |
|
Collaborator permissions payload. |
|
Repository payload returned by repository endpoints. |
Repository collaborator presence check response. |
|
|
Customized repository role definition. |
Repository download statistics payload. |
|
Per-day repository download statistics entry. |
|
Metadata for a |
|
|
Repository permission summary. |
|
Repository member management mode. |
|
Repository push rules configuration. |
Response returned after updating repository reviewer settings. |
|
|
Repository-level settings payload. |
|
Minimal repository payload embedded in issue/search responses. |
|
Repository transfer result payload. |
|
Uploaded repository attachment metadata. |
|
Issue search result payload. |
|
Repository search result payload. |
|
Backward-compatible generic search result payload. |
|
User search result payload. |
|
Tag payload. |
|
Commit object embedded in tag payloads. |
|
Tagger identity. |
|
Git tree payload. |
|
Git tree entry. |
|
User profile payload returned by user-related endpoints. |
|
Single activity event returned by the user events endpoint. |
|
Link bundle embedded in user event responses. |
|
Project summary embedded in user event responses. |
|
Push event metadata embedded in user events. |
|
Grouped user events response keyed by date. |
|
Compact user payload embedded in other responses. |
|
Compact user payload returned by stargazer/subscriber endpoints. |
|
Webhook payload. |
- class APIObject(data: Mapping[str, Any])
Bases:
Mapping[str,Any]Dictionary-backed wrapper around GitCode JSON objects.
Initialize from API response data.
- get(key: str, default: Any = None) Any
Return the value for
key, ordefaultif missing.
- to_dict() Dict[str, Any]
Return a shallow copy of the backing mapping.
- as_model(data: Mapping[str, Any], model_type: type[ModelT]) ModelT
Wrap a mapping in the requested SDK model type.
- as_model_list(data: List[Mapping[str, Any]], model_type: type[ModelT]) List[ModelT]
Wrap a list of mappings in the requested SDK model type.
- class UserRef(data: Mapping[str, Any])
Bases:
APIObjectCompact user payload embedded in other responses.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
login (Optional[str]) – Account login name.
name (Optional[str]) – Display name.
username (Optional[str]) – Account username.
type (Optional[str]) – Type of the object.
html_url (Optional[str]) – Web URL for this object.
avatar_url (Optional[str]) – Avatar image URL.
email (Optional[str]) – Email address.
state (Optional[str]) – Current state value.
member_role (Optional[str]) – Role of the user within the current repository or organization context.
remark (Optional[str]) – Remark or note recorded for the user.
url (Optional[str]) – API URL for this object.
web_url (Optional[str]) – Web URL for this object.
name_cn (Optional[str]) – Chinese display name for the user.
avatar_path (Optional[str]) – Path to the user avatar resource.
tenant_name (Optional[str]) – Tenant name associated with the user.
is_member (Optional[bool]) – Whether the user is a member in the current context.
assignee (Optional[bool]) – Whether the user can be selected as an assignee.
code_owner (Optional[bool]) – Whether the user is configured as a code owner.
accept (Optional[bool]) – Whether the user has accepted the invitation or request.
Initialize from API response data.
- class User(data: Mapping[str, Any])
Bases:
UserRefUser profile payload returned by user-related endpoints.
- Variables:
followers_url (Optional[str]) – Followers URL.
following_url (Optional[str]) – Following URL.
gists_url (Optional[str]) – Gists URL.
organizations_url (Optional[str]) – Organizations URL.
received_events_url (Optional[str]) – Received events URL.
repos_url (Optional[str]) – Repos URL.
starred_url (Optional[str]) – Starred URL.
subscriptions_url (Optional[str]) – Subscriptions URL.
bio (Optional[str]) – Bio.
blog (Optional[str]) – Blog.
company (Optional[str]) – Company.
followers (Optional[int]) – Followers.
following (Optional[int]) – Following.
top_languages (Optional[List[str]]) – Top languages.
Initialize from API response data.
- class UserSummary(data: Mapping[str, Any])
Bases:
APIObjectCompact user payload returned by stargazer/subscriber endpoints.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
login (Optional[str]) – Account login name.
name (Optional[str]) – Display name.
avatar_url (Optional[str]) – Avatar image URL.
html_url (Optional[str]) – Web URL for this object.
type (Optional[str]) – Type of the object.
Initialize from API response data.
- class NamespaceDetails(data: Mapping[str, Any])
Bases:
APIObjectNamespace object embedded in repository payloads.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
type (Optional[str]) – Type of the object.
name (Optional[str]) – Display name.
path (Optional[str]) – Repository-relative or namespace path.
html_url (Optional[str]) – Web URL for this object.
develop_mode (Optional[str]) – Development mode configured for the namespace.
region (Optional[str]) – Region.
cell (Optional[str]) – Cell identifier of the namespace.
kind (Optional[str]) – Kind of namespace.
full_path (Optional[str]) – Full path for the object.
full_name (Optional[str]) – Full display name for the object.
parent_id (Optional[Union[int, str]]) – ID of the parent namespace.
visibility_level (Optional[int]) – Visibility level configured for the namespace.
enable_file_control (Optional[bool]) – Whether file control is enabled for the namespace.
owner_id (Optional[Union[int, str]]) – ID of the namespace owner.
Initialize from API response data.
- class Namespace(data: Mapping[str, Any])
Bases:
APIObjectNamespace payload returned by the namespace lookup endpoint.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
path (Optional[str]) – Repository-relative or namespace path.
name (Optional[str]) – Display name.
html_url (Optional[str]) – Web URL for this object.
type (Optional[str]) – Type of the object.
Initialize from API response data.
- class RepositoryPermission(data: Mapping[str, Any])
Bases:
APIObjectRepository permission summary.
- Variables:
pull (Optional[bool]) – Pull.
push (Optional[bool]) – Push.
admin (Optional[bool]) – Admin.
Initialize from API response data.
- class EnterpriseRef(data: Mapping[str, Any])
Bases:
APIObjectEnterprise summary embedded in repository search results.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
path (Optional[str]) – Repository-relative or namespace path.
html_url (Optional[str]) – Web URL for this object.
type (Optional[str]) – Type of the object.
Initialize from API response data.
- class Repository(data: Mapping[str, Any])
Bases:
APIObjectRepository payload returned by repository endpoints.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
full_name (Optional[str]) – Full display name for the object.
human_name (Optional[str]) – Human-readable display name.
path (Optional[str]) – Repository-relative or namespace path.
name (Optional[str]) – Display name.
description (Optional[str]) – Description text.
namespace (Optional[NamespaceDetails]) – Namespace that contains the repository.
owner (Optional[UserRef]) – Owner of the object.
private (Optional[bool]) – Whether the repository is private.
public (Optional[Union[bool, int]]) – Whether the repository is public.
internal (Optional[bool]) – Whether the repository is internal.
fork (Optional[bool]) – Whether the repository is a fork.
html_url (Optional[str]) – Web URL for this object.
web_url (Optional[str]) – Web URL for this object.
url (Optional[str]) – API URL for this object.
ssh_url_to_repo (Optional[str]) – Ssh url to repo.
http_url_to_repo (Optional[str]) – Http url to repo.
forks_count (Optional[int]) – Number of forks.
stargazers_count (Optional[int]) – Number of stargazers.
watchers_count (Optional[int]) – Number of watchers.
default_branch (Optional[str]) – Default branch name.
open_issues_count (Optional[int]) – Number of open issues.
license (Optional[APIObject]) – License.
project_creator (Optional[str]) – Login or identifier of the repository creator.
pushed_at (Optional[str]) – Timestamp of the most recent push.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
homepage (Optional[str]) – Homepage URL configured for the repository.
status (Optional[str]) – Status string returned by the API.
relation (Optional[str]) – Relationship between the current user and the repository.
members (Optional[List[str]]) – Members returned in the repository payload.
parent (Optional[Dict[str, Any]]) – Upstream source repository information
permission (Optional[RepositoryPermission]) – Permission summary for this object.
enterprise (Optional[Union[EnterpriseRef, str]]) – Enterprise associated with the repository.
issue_template_source (Optional[str]) – Source of the issue template project.
has_issue (Optional[bool]) – Whether issue tracking is enabled for the repository.
assigner (Optional[UserRef]) – User who assigned reviewers or assignees.
assignee (Optional[UserRef]) – Assigned user.
assignees_number (Optional[int]) – Number of configured assignees.
testers_number (Optional[int]) – Number of configured testers.
testers (Optional[List[UserRef]]) – Users configured as testers.
paas (Optional[APIObject]) – PaaS metadata attached to the repository.
Initialize from API response data.
- class SearchRepository(data: Mapping[str, Any])
Bases:
APIObjectRepository search result payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
full_name (Optional[str]) – Full display name for the object.
human_name (Optional[str]) – Human-readable display name.
url (Optional[str]) – API URL for this object.
namespace (Optional[Namespace]) – Namespace.
path (Optional[str]) – Repository-relative or namespace path.
name (Optional[str]) – Display name.
description (Optional[str]) – Description text.
status (Optional[str]) – Status string returned by the API.
ssh_url_to_repo (Optional[str]) – Ssh url to repo.
http_url_to_repo (Optional[str]) – Http url to repo.
web_url (Optional[str]) – Web URL for this object.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
homepage (Optional[str]) – Homepage URL configured for the repository.
members (Optional[List[str]]) – Members.
forks_count (Optional[int]) – Number of forks.
stargazers_count (Optional[int]) – Number of stargazers.
relation (Optional[str]) – Relationship between the current user and the repository.
permission (Optional[RepositoryPermission]) – Permission summary for this object.
internal (Optional[bool]) – Whether the repository is internal.
open_issues_count (Optional[int]) – Number of open issues.
has_issue (Optional[bool]) – Whether the object has issue.
watchers_count (Optional[int]) – Number of watchers.
enterprise (Optional[EnterpriseRef]) – Enterprise.
default_branch (Optional[str]) – Default branch name.
fork (Optional[bool]) – Whether the repository is a fork.
pushed_at (Optional[str]) – Timestamp of the most recent push.
owner (Optional[UserSummary]) – Owner of the object.
issue_template_source (Optional[str]) – Source of the issue template project.
private (Optional[bool]) – Whether the repository is private.
public (Optional[bool]) – Whether the repository is public.
Initialize from API response data.
- class Contributor(data: Mapping[str, Any])
Bases:
APIObjectContributor payload returned by repository statistics endpoints.
- Variables:
name (Optional[str]) – Display name.
contributions (Optional[int]) – Contributions.
email (Optional[str]) – Email address.
Initialize from API response data.
- class ContentLinks(data: Mapping[str, Any])
Bases:
APIObjectRepository content link bundle.
- Variables:
self (Optional[str]) – Self.
html (Optional[str]) – Html.
git (Optional[str]) – Git.
download (Optional[str]) – Download.
Initialize from API response data.
- class ContentObject(data: Mapping[str, Any])
Bases:
APIObjectRepository content payload for files and directories.
- Variables:
type (Optional[str]) – Type of the object.
encoding (Optional[str]) – Encoding used for the content body.
size (Optional[int]) – Size.
name (Optional[str]) – Display name.
path (Optional[str]) – Repository-relative or namespace path.
content (Optional[str]) – Content returned for this object.
sha (Optional[str]) – Git SHA value.
url (Optional[str]) – API URL for this object.
html_url (Optional[str]) – Web URL for this object.
download_url (Optional[str]) – Direct download URL for the content.
_links (Optional[ContentLinks]) – Related content links returned by the API.
Initialize from API response data.
- class RepositoryGitCodeTemplate(data: Mapping[str, Any])
Bases:
APIObjectMetadata for a
.gitcodeissue or pull request template file.Returned by
list_templates()andlist_templates(). Useget_template()orget_template()to load the body.- Variables:
path (Optional[str]) – Repository-relative path (under
.gitcode/).sha (Optional[str]) – Object SHA for the file.
template_owner (Optional[str]) – Owner path of the repository the template was resolved from.
template_repo (Optional[str]) – Repository name the template was resolved from.
Initialize from API response data.
- class CommitIdentity(data: Mapping[str, Any])
Bases:
APIObjectCommit author/committer identity.
- Variables:
name (Optional[str]) – Display name.
email (Optional[str]) – Email address.
date (Optional[str]) – Date.
Initialize from API response data.
- class CommitParent(data: Mapping[str, Any])
Bases:
APIObjectCommit parent reference.
- Variables:
sha (Optional[str]) – Git SHA value.
url (Optional[str]) – API URL for this object.
Initialize from API response data.
- class CommitTreeRef(data: Mapping[str, Any])
Bases:
APIObjectTree reference embedded in commit summaries.
- Variables:
sha (Optional[str]) – Git SHA value.
url (Optional[str]) – API URL for this object.
Initialize from API response data.
- class CommitPayload(data: Mapping[str, Any])
Bases:
APIObjectNested commit metadata.
- Variables:
author (Optional[CommitIdentity]) – Author associated with this object.
committer (Optional[CommitIdentity]) – Committer associated with this object.
tree (Optional[CommitTreeRef]) – Tree.
message (Optional[str]) – Message text returned by the API.
Initialize from API response data.
- class ContentWriteCommit(data: Mapping[str, Any])
Bases:
APIObjectCommit object returned by content write endpoints.
- Variables:
sha (Optional[str]) – Git SHA value.
author (Optional[CommitIdentity]) – Author associated with this object.
committer (Optional[CommitIdentity]) – Committer associated with this object.
message (Optional[str]) – Message text returned by the API.
parents (Optional[List[CommitParent]]) – Parents.
Initialize from API response data.
- class CommitResult(data: Mapping[str, Any])
Bases:
APIObjectCommit result payload returned by content write operations.
- Variables:
content (Optional[ContentObject]) – Content returned for this object.
commit (Optional[ContentWriteCommit]) – Commit.
Initialize from API response data.
- class TreeEntry(data: Mapping[str, Any])
Bases:
APIObjectGit tree entry.
- Variables:
sha (Optional[str]) – Git SHA value.
name (Optional[str]) – Display name.
type (Optional[str]) – Type of the object.
path (Optional[str]) – Repository-relative or namespace path.
mode (Optional[str]) – Mode.
md5 (Optional[str]) – Md5.
Initialize from API response data.
- class Tree(data: Mapping[str, Any])
Bases:
APIObjectGit tree payload.
- Variables:
tree (Optional[List[TreeEntry]]) – Tree.
Initialize from API response data.
- class Blob(data: Mapping[str, Any])
Bases:
APIObjectGit blob payload.
- Variables:
sha (Optional[str]) – Git SHA value.
size (Optional[int]) – Size.
encoding (Optional[str]) – Encoding.
content (Optional[str]) – Content returned for this object.
Initialize from API response data.
- class BranchListCommit(data: Mapping[str, Any])
Bases:
APIObjectNested branch summary commit payload.
- Variables:
commit (Optional[CommitPayload]) – Commit.
sha (Optional[str]) – Git SHA value.
url (Optional[str]) – API URL for this object.
Initialize from API response data.
- class Branch(data: Mapping[str, Any])
Bases:
APIObjectRepository branch payload returned by list/create endpoints.
- Variables:
name (Optional[str]) – Display name.
commit (Optional[BranchListCommit]) – Commit.
protected (Optional[bool]) – Whether the branch is protected.
Initialize from API response data.
- class BranchDetailCommit(data: Mapping[str, Any])
Bases:
APIObjectCommit object returned inside branch detail responses.
- Variables:
id (Optional[str]) – Unique identifier for this object.
message (Optional[str]) – Message text returned by the API.
parent_ids (Optional[List[str]]) – Parent commit IDs.
authored_date (Optional[str]) – Timestamp when the commit was authored.
author_name (Optional[str]) – Author name.
author_iam_id (Optional[str]) – IAM identifier of the commit author.
author_email (Optional[str]) – Author email.
author_user_name (Optional[str]) – Username of the commit author.
committed_date (Optional[str]) – Timestamp when the commit was committed.
committer_name (Optional[str]) – Committer name.
committer_email (Optional[str]) – Committer email.
committer_user_name (Optional[str]) – Username of the committer.
open_gpg_verified (Optional[bool]) – Whether OpenGPG verification is enabled for the commit.
verification_status (Optional[str]) – Signature verification status for the commit.
gpg_primary_key_id (Optional[str]) – Primary GPG key ID used for verification.
short_id (Optional[str]) – Short commit identifier.
created_at (Optional[str]) – Timestamp when this object was created.
title (Optional[str]) – Title of the object.
author_avatar_url (Optional[str]) – Avatar URL of the commit author.
committer_avatar_url (Optional[str]) – Avatar URL of the committer.
relate_url (Optional[str]) – Related web URL for the commit.
Initialize from API response data.
- class BranchDetail(data: Mapping[str, Any])
Bases:
APIObjectRepository branch payload returned by the detail endpoint.
- Variables:
name (Optional[str]) – Display name.
commit (Optional[BranchDetailCommit]) – Commit.
merged (Optional[bool]) – Merged.
protected (Optional[bool]) – Whether the branch is protected.
developers_can_push (Optional[bool]) – Developers can push.
developers_can_merge (Optional[bool]) – Developers can merge.
can_push (Optional[bool]) – Whether the current user can push.
default (Optional[bool]) – Whether this is the default branch.
Initialize from API response data.
- class ProtectedBranch(data: Mapping[str, Any])
Bases:
APIObjectProtected branch configuration payload.
- Variables:
name (Optional[str]) – Display name.
updated_at (Optional[str]) – Timestamp when this object was last updated.
push_users (Optional[Union[List[UserRef], List[Any]]]) – Users allowed to push to the protected branch.
merge_users (Optional[Union[List[UserRef], List[Any]]]) – Users allowed to merge into the protected branch.
merged (Optional[bool]) – Merged.
developers_can_push (Optional[bool]) – Whether developers can push to the protected branch.
developers_can_merge (Optional[bool]) – Whether developers can merge into the protected branch.
committer_can_push (Optional[bool]) – Whether committers can push to the protected branch.
committer_can_merge (Optional[bool]) – Whether committers can merge into the protected branch.
master_can_push (Optional[bool]) – Whether masters can push to the protected branch.
master_can_merge (Optional[bool]) – Whether masters can merge into the protected branch.
maintainer_can_push (Optional[bool]) – Whether maintainers can push to the protected branch.
maintainer_can_merge (Optional[bool]) – Whether maintainers can merge into the protected branch.
owner_can_push (Optional[bool]) – Whether owners can push to the protected branch.
owner_can_merge (Optional[bool]) – Whether owners can merge into the protected branch.
no_one_can_push (Optional[bool]) – Whether pushing is disabled for everyone.
no_one_can_merge (Optional[bool]) – Whether merging is disabled for everyone.
Initialize from API response data.
- class CommitAuthorSummary(data: Mapping[str, Any])
Bases:
APIObjectAuthor summary on commit/search payloads.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
login (Optional[str]) – Account login name.
name (Optional[str]) – Display name.
type (Optional[str]) – Type of the object.
email (Optional[str]) – Email address.
date (Optional[str]) – Date.
Initialize from API response data.
- class CommitStats(data: Mapping[str, Any])
Bases:
APIObjectCommit diff stats.
- Variables:
additions (Optional[int]) – Additions.
deletions (Optional[int]) – Deletions.
total (Optional[int]) – Total.
Initialize from API response data.
- class CommitFile(data: Mapping[str, Any])
Bases:
APIObjectCommit file entry.
- Variables:
filename (Optional[str]) – Filename.
raw_url (Optional[str]) – Raw URL.
content_url (Optional[str]) – Content URL.
Initialize from API response data.
- class CommitSummary(data: Mapping[str, Any])
Bases:
APIObjectCommit payload returned by list endpoints.
- Variables:
url (Optional[str]) – API URL for this object.
sha (Optional[str]) – Git SHA value.
html_url (Optional[str]) – Web URL for this object.
comments_url (Optional[str]) – Comments URL.
commit (Optional[CommitPayload]) – Commit.
author (Optional[CommitAuthorSummary]) – Author associated with this object.
committer (Optional[CommitAuthorSummary]) – Committer associated with this object.
parents (Optional[List[CommitParent]]) – Parents.
Initialize from API response data.
- class Commit(data: Mapping[str, Any])
Bases:
CommitSummaryCommit payload returned by detail endpoints.
- Variables:
stats (Optional[CommitStats]) – Stats.
files (Optional[List[CommitFile]]) – Files.
id (Optional[str]) – Unique identifier for this object.
message (Optional[str]) – Message text returned by the API.
parent_ids (Optional[List[str]]) – Parent ids.
authored_date (Optional[str]) – Authored date.
author_name (Optional[str]) – Author name.
author_iam_id (Optional[str]) – ID of the related author iam.
author_email (Optional[str]) – Author email.
author_user_name (Optional[str]) – Author user name.
committed_date (Optional[str]) – Committed date.
committer_name (Optional[str]) – Committer name.
committer_email (Optional[str]) – Committer email.
committer_user_name (Optional[str]) – Committer user name.
open_gpg_verified (Optional[bool]) – Open gpg verified.
verification_status (Optional[str]) – Verification status.
gpg_primary_key_id (Optional[str]) – ID of the related gpg primary key.
short_id (Optional[str]) – ID of the related short.
created_at (Optional[str]) – Timestamp when this object was created.
title (Optional[str]) – Title of the object.
author_avatar_url (Optional[str]) – Author avatar URL.
committer_avatar_url (Optional[str]) – Committer avatar URL.
relate_url (Optional[str]) – Relate URL.
Initialize from API response data.
- class CommitComparison(data: Mapping[str, Any])
Bases:
APIObjectCommit comparison payload.
- Variables:
base_commit (Optional[CommitSummary]) – Base commit.
merge_base_commit (Optional[CommitSummary]) – Merge base commit.
commits (Optional[List[CommitSummary]]) – Commits.
files (Optional[List[CommitFile]]) – Files.
status (Optional[str]) – Status string returned by the API.
ahead_by (Optional[int]) – Ahead by.
behind_by (Optional[int]) – Behind by.
total_commits (Optional[int]) – Total commits.
commits_count (Optional[int]) – Number of commits.
Initialize from API response data.
- class CommitComment(data: Mapping[str, Any])
Bases:
APIObjectCommit comment payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
body (Optional[str]) – Body text of the object.
user (Optional[UserRef]) – User associated with this object.
commit_id (Optional[str]) – ID of the related commit.
path (Optional[str]) – Repository-relative or namespace path.
position (Optional[int]) – Position.
line (Optional[int]) – Line.
noteable_id (Optional[int]) – ID of the related noteable.
noteable_type (Optional[str]) – Noteable type.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
html_url (Optional[str]) – Web URL for this object.
target (Optional[APIObject]) – Target.
Initialize from API response data.
- class Label(data: Mapping[str, Any])
Bases:
APIObjectLabel payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
name (Optional[str]) – Display name.
title (Optional[str]) – Title of the object.
color (Optional[str]) – Color.
repository_id (Optional[int]) – Numeric ID of the related repository.
type (Optional[str]) – Type of the object.
text_color (Optional[str]) – Text color.
Initialize from API response data.
- class RepositorySummary(data: Mapping[str, Any])
Bases:
APIObjectMinimal repository payload embedded in issue/search responses.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
full_name (Optional[str]) – Full display name for the object.
human_name (Optional[str]) – Human-readable display name.
path (Optional[str]) – Repository-relative or namespace path.
name (Optional[str]) – Display name.
url (Optional[str]) – API URL for this object.
description (Optional[str]) – Description text.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
owner (Optional[Union[UserSummary, UserRef]]) – Owner of the object.
Initialize from API response data.
- class Issue(data: Mapping[str, Any])
Bases:
APIObjectIssue payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
html_url (Optional[str]) – Web URL for this object.
number (Optional[Union[int, str]]) – Sequence number for the object within its repository.
state (Optional[str]) – Current state value.
title (Optional[str]) – Title of the object.
body (Optional[str]) – Body text of the object.
user (Optional[Union[User, UserRef]]) – User associated with this object.
repository (Optional[RepositorySummary]) – Repository.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
finished_at (Optional[str]) – Timestamp when this issue was completed.
labels (Optional[List[Label]]) – Labels attached to this object.
priority (Optional[Union[int, str]]) – Priority value of the issue.
issue_type (Optional[str]) – Issue type returned by the API.
issue_state (Optional[str]) – Workflow state of the issue.
issue_state_detail (Optional[str]) – Detailed workflow state information for the issue.
stage (Optional[str]) – Current workflow stage of the issue.
severity (Optional[str]) – Severity level of the issue.
comments (Optional[int]) – Number of comments.
parent_id (Optional[int]) – ID of the parent issue.
Initialize from API response data.
- class SearchIssue(data: Mapping[str, Any])
Bases:
IssueIssue search result payload.
- Variables:
repository (Optional[RepositorySummary]) – Repository.
Initialize from API response data.
- class IssueComment(data: Mapping[str, Any])
Bases:
APIObjectIssue comment payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
body (Optional[str]) – Body text of the object.
user (Optional[UserRef]) – User associated with this object.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
target (Optional[APIObject]) – Target.
Initialize from API response data.
- class IssueOperationLog(data: Mapping[str, Any])
Bases:
APIObjectIssue operation log payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
action_type (Optional[str]) – Action type.
content (Optional[str]) – Content returned for this object.
created_at (Optional[str]) – Timestamp when this object was created.
user (Optional[UserRef]) – User associated with this object.
Initialize from API response data.
- class PullRequestBranch(data: Mapping[str, Any])
Bases:
APIObjectHead/base branch payload in pull request responses.
- Variables:
label (Optional[str]) – Display label for the ref.
ref (Optional[str]) – Git ref name.
sha (Optional[str]) – Git SHA value.
user (Optional[UserRef]) – User associated with this object.
repo (Optional[Repository]) – Repo.
Initialize from API response data.
- class PullRequestApprover(data: Mapping[str, Any])
Bases:
APIObjectApprover/tester embedded in pull request responses.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
username (Optional[str]) – Account username.
name (Optional[str]) – Display name.
nick_name (Optional[str]) – Nickname of the approver or tester.
name_cn (Optional[str]) – Chinese display name of the approver or tester.
email (Optional[str]) – Email address.
state (Optional[str]) – Current state value.
is_codeowner (Optional[bool]) – Whether the approver is a code owner.
updated_at (Optional[str]) – Timestamp when this object was last updated.
avatar_url (Optional[str]) – Avatar image URL.
Initialize from API response data.
- class PullRequestTimeStats(data: Mapping[str, Any])
Bases:
APIObjectTime tracking fields embedded in pull requests.
- Variables:
time_estimate (Optional[int]) – Estimated time in seconds.
total_time_spent (Optional[int]) – Total time spent in seconds.
human_time_estimate (Optional[str]) – Human-readable estimated time.
human_total_time_spent (Optional[str]) – Human-readable total time spent.
Initialize from API response data.
- class PullRequestDiffRefs(data: Mapping[str, Any])
Bases:
APIObjectDiff refs embedded in pull requests.
- Variables:
base_sha (Optional[str]) – Base sha.
head_sha (Optional[str]) – Head sha.
start_sha (Optional[str]) – Start sha.
Initialize from API response data.
- class PullRequest(data: Mapping[str, Any])
Bases:
APIObjectPull request payload.
- Variables:
number (Optional[Union[int, str]]) – Sequence number for the object within its repository.
id (Optional[Union[int, str]]) – Unique identifier for this object.
iid (Optional[int]) – Internal identifier scoped to the repository.
project_id (Optional[int]) – Numeric ID of the related project.
html_url (Optional[str]) – Web URL for this object.
url (Optional[str]) – API URL for this object.
title (Optional[str]) – Title of the object.
body (Optional[str]) – Body text of the object.
state (Optional[str]) – Current state value.
draft (Optional[bool]) – Whether the pull request is a draft.
close_related_issue (Optional[bool]) – Whether related issues are closed when the pull request is merged.
prune_branch (Optional[bool]) – Whether the source branch should be pruned after merge.
labels (Optional[List[Label]]) – Labels attached to this object.
user (Optional[UserRef]) – User associated with this object.
assignees (Optional[List[UserRef]]) – Users assigned to this object.
head (Optional[PullRequestBranch]) – Head.
base (Optional[PullRequestBranch]) – Base.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
merged_at (Optional[str]) – Timestamp when this pull request was merged.
closed_by (Optional[UserRef]) – Closed by.
closed_at (Optional[str]) – Timestamp when this object was closed.
target_branch (Optional[str]) – Target branch name.
source_branch (Optional[str]) – Source branch name.
squash_commit_message (Optional[str]) – Commit message to use for a squash merge.
user_notes_count (Optional[int]) – Number of user notes on the pull request.
upvotes (Optional[int]) – Number of upvotes.
downvotes (Optional[int]) – Number of downvotes.
source_project_id (Optional[int]) – ID of the source project.
target_project_id (Optional[int]) – ID of the target project.
work_in_progress (Optional[bool]) – Whether the pull request is marked as work in progress.
milestone (Optional[APIObject]) – Milestone associated with the pull request.
merge_when_pipeline_succeeds (Optional[bool]) – Whether the pull request should merge automatically after the pipeline succeeds.
merge_status (Optional[str]) – Merge status reported by the API.
sha (Optional[str]) – Git SHA value.
merge_commit_sha (Optional[str]) – SHA of the merge commit.
should_remove_source_branch (Optional[bool]) – Whether the source branch should be removed after merge.
force_remove_source_branch (Optional[bool]) – Whether the source branch should be force removed after merge.
web_url (Optional[str]) – Web URL for this object.
time_stats (Optional[PullRequestTimeStats]) – Time tracking information for the pull request.
squash (Optional[bool]) – Whether the pull request will be squashed on merge.
merge_request_type (Optional[str]) – Pull request type returned by the API.
has_pre_merge_ref (Optional[bool]) – Whether a pre-merge ref exists for the pull request.
review_mode (Optional[str]) – Review mode configured for the pull request.
is_source_branch_exist (Optional[bool]) – Whether the source branch still exists.
approval_merge_request_approvers (Optional[List[PullRequestApprover]]) – Approvers configured for the pull request.
approval_merge_request_testers (Optional[List[PullRequestApprover]]) – Testers configured for the pull request.
added_lines (Optional[int]) – Number of added lines in the pull request.
removed_lines (Optional[int]) – Number of removed lines in the pull request.
subscribed (Optional[bool]) – Whether the current user is subscribed.
changes_count (Optional[Union[int, str]]) – Number of changed files or changes reported by the API.
diff_refs (Optional[PullRequestDiffRefs]) – Diff references used to compute the pull request changes.
notes (Optional[int]) – Number of notes.
unresolved_discussions_count (Optional[int]) – Number of unresolved discussions.
gate_check (Optional[bool]) – Whether gate checks passed for the pull request.
Initialize from API response data.
- class PullRequestCount(data: Mapping[str, Any])
Bases:
APIObjectPull request count payload returned when
only_countis enabled.- Variables:
all (Optional[int]) – All.
opened (Optional[int]) – Opened.
closed (Optional[int]) – Closed.
merged (Optional[int]) – Merged.
locked (Optional[int]) – Locked.
Initialize from API response data.
- class PullRequestFile(data: Mapping[str, Any])
Bases:
APIObjectPull request file diff payload.
- Variables:
filename (Optional[str]) – Filename.
status (Optional[str]) – Status string returned by the API.
additions (Optional[int]) – Additions.
deletions (Optional[int]) – Deletions.
changes (Optional[int]) – Changes.
blob_url (Optional[str]) – Blob URL.
raw_url (Optional[str]) – Raw URL.
contents_url (Optional[str]) – Contents URL.
patch (Optional[str]) – Patch.
Initialize from API response data.
- class PullRequestComment(data: Mapping[str, Any])
Bases:
APIObjectPull request comment payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
body (Optional[str]) – Body text of the object.
user (Optional[UserRef]) – User associated with this object.
path (Optional[str]) – Repository-relative or namespace path.
position (Optional[int]) – Position.
commit_id (Optional[str]) – ID of the related commit.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
comment_type (Optional[str]) – Comment type.
target (Optional[APIObject]) – Target.
Initialize from API response data.
- class PullRequestReview(data: Mapping[str, Any])
Bases:
APIObjectPull request review payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
state (Optional[str]) – Current state value.
body (Optional[str]) – Body text of the object.
Initialize from API response data.
- class PullRequestTest(data: Mapping[str, Any])
Bases:
APIObjectPull request test request payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
state (Optional[str]) – Current state value.
body (Optional[str]) – Body text of the object.
Initialize from API response data.
- class MergeResult(data: Mapping[str, Any])
Bases:
APIObjectMerge operation result payload.
- Variables:
sha (Optional[str]) – Git SHA value.
merged (Optional[bool]) – Merged.
message (Optional[str]) – Message text returned by the API.
Initialize from API response data.
- class MergeStatus(data: Mapping[str, Any])
Bases:
APIObjectMerge status payload.
- Variables:
message (Optional[str]) – Message text returned by the API.
error (Optional[str]) – Error.
Initialize from API response data.
- class Milestone(data: Mapping[str, Any])
Bases:
APIObjectMilestone payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
number (Optional[int]) – Sequence number for the object within its repository.
title (Optional[str]) – Title of the object.
description (Optional[str]) – Description text.
state (Optional[str]) – Current state value.
due_on (Optional[str]) – Due date for the milestone.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
Initialize from API response data.
- class RepoMemberPermissions(data: Mapping[str, Any])
Bases:
APIObjectCollaborator permissions payload.
- Variables:
pull (Optional[bool]) – Pull.
push (Optional[bool]) – Push.
admin (Optional[bool]) – Admin.
Initialize from API response data.
- class RepoMember(data: Mapping[str, Any])
Bases:
APIObjectRepository member payload returned by add/update operations.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
login (Optional[str]) – Account login name.
name (Optional[str]) – Display name.
avatar_url (Optional[str]) – Avatar image URL.
html_url (Optional[str]) – Web URL for this object.
remark (Optional[str]) – Remark.
type (Optional[str]) – Type of the object.
permissions (Optional[RepoMemberPermissions]) – Permissions granted for this user.
Initialize from API response data.
- class RepoCollaborator(data: Mapping[str, Any])
Bases:
APIObjectRepository collaborator payload returned by list operations.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
name (Optional[str]) – Display name.
username (Optional[str]) – Account username.
nick_name (Optional[str]) – Nick name.
state (Optional[str]) – Current state value.
avatar (Optional[str]) – Avatar path or URL returned for the collaborator.
avatar_url (Optional[str]) – Avatar image URL.
email (Optional[str]) – Email address.
name_cn (Optional[str]) – Name cn.
web_url (Optional[str]) – Web URL for this object.
access_level (Optional[int]) – Access level granted to the collaborator.
expires_at (Optional[str]) – Timestamp when the collaborator access expires.
limited (Optional[bool]) – Whether the collaborator has limited access.
type (Optional[str]) – Type of the object.
last_owner (Optional[str]) – Previous owner recorded for the collaborator source.
is_current_source_member (Optional[bool]) – Whether the collaborator is still a member of the source entity.
last_source_owner (Optional[str]) – Previous source owner recorded for the collaborator.
join_way (Optional[str]) – How the collaborator joined the repository.
source_name (Optional[str]) – Name of the source entity that granted access.
member_roles (Optional[List[APIObject]]) – Custom member roles attached to the collaborator.
iam_id (Optional[str]) – IAM identifier of the collaborator.
committer_system_from (Optional[str]) – System from which committer identity is sourced.
permissions (Optional[RepoMemberPermissions]) – Permissions granted for this user.
Initialize from API response data.
- class RepoMemberPermission(data: Mapping[str, Any])
Bases:
APIObjectRepository member permission payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
login (Optional[str]) – Account login name.
permission (Optional[str]) – Permission summary for this object.
Initialize from API response data.
- class ReleaseAsset(data: Mapping[str, Any])
Bases:
APIObjectAsset metadata embedded in release payloads.
- Variables:
browser_download_url (Optional[str]) – Browser download URL for this asset.
name (Optional[str]) – Asset file name.
type (Optional[str]) – Asset media type.
Initialize from API response data.
- class Release(data: Mapping[str, Any])
Bases:
APIObjectRelease payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
tag_name (Optional[str]) – Tag name.
target_commitish (Optional[str]) – Branch or commit SHA targeted by the release tag.
prerelease (Optional[bool]) – Whether this release is a pre-release.
name (Optional[str]) – Display name.
body (Optional[str]) – Body text of the object.
author (Optional[UserRef]) – Author associated with this object.
created_at (Optional[str]) – Timestamp when this object was created.
published_at (Optional[str]) – Timestamp when this object was published.
html_url (Optional[str]) – Web URL for this object.
assets (Optional[List[ReleaseAsset]]) – Release source packages and uploaded attachments.
release_status (Optional[str]) – Release status, for example
preorlatest.
Initialize from API response data.
- class ReleaseUploadURL(data: Mapping[str, Any])
Bases:
APIObjectPre-signed release attachment upload target.
- Variables:
url (Optional[str]) – Pre-signed object storage URL for uploading with
PUT.headers (Optional[Dict[str, str]]) – Headers to send unchanged with the upload request.
Initialize from API response data.
- class TagCommit(data: Mapping[str, Any])
Bases:
APIObjectCommit object embedded in tag payloads.
- Variables:
sha (Optional[str]) – Git SHA value.
url (Optional[str]) – API URL for this object.
Initialize from API response data.
- class Tagger(data: Mapping[str, Any])
Bases:
APIObjectTagger identity.
- Variables:
name (Optional[str]) – Display name.
email (Optional[str]) – Email address.
date (Optional[str]) – Date.
Initialize from API response data.
- class Tag(data: Mapping[str, Any])
Bases:
APIObjectTag payload.
- Variables:
Initialize from API response data.
- class ProtectedTag(data: Mapping[str, Any])
Bases:
APIObjectProtected tag configuration payload.
- Variables:
name (Optional[str]) – Display name.
create_access_level (Optional[int]) – Access level required to create the protected tag.
create_access_level_desc (Optional[str]) – Description of the access levels allowed to create the protected tag.
Initialize from API response data.
- class Webhook(data: Mapping[str, Any])
Bases:
APIObjectWebhook payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
url (Optional[str]) – API URL for this object.
password (Optional[str]) – Password.
result (Optional[str]) – Result text returned by the webhook.
project_id (Optional[int]) – Numeric ID of the related project.
result_code (Optional[int]) – Result code returned by the webhook.
push_events (Optional[bool]) – Push events.
tag_push_events (Optional[bool]) – Tag push events.
issues_events (Optional[bool]) – Issues events.
note_events (Optional[bool]) – Note events.
merge_requests_events (Optional[bool]) – Merge requests events.
created_at (Optional[str]) – Timestamp when this object was created.
Initialize from API response data.
- class OrganizationSummary(data: Mapping[str, Any])
Bases:
APIObjectOrganization summary payload returned by list endpoints.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
login (Optional[str]) – Account login name.
path (Optional[str]) – Repository-relative or namespace path.
name (Optional[str]) – Display name.
avatar_url (Optional[str]) – Avatar image URL.
repos_url (Optional[str]) – Repos URL.
events_url (Optional[str]) – Events URL.
members_url (Optional[str]) – Members URL.
description (Optional[str]) – Description text.
follow_count (Optional[int]) – Number of follow.
Initialize from API response data.
- class Organization(data: Mapping[str, Any])
Bases:
OrganizationSummaryOrganization payload.
- Variables:
enterprise (Optional[str]) – Enterprise identifier associated with the organization.
gitee (Optional[APIObject]) – Additional mirrored-platform metadata.
Initialize from API response data.
- class OrganizationMembership(data: Mapping[str, Any])
Bases:
APIObjectOrganization membership payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
path (Optional[str]) – Repository-relative or namespace path.
name (Optional[str]) – Display name.
url (Optional[str]) – API URL for this object.
avatar_url (Optional[str]) – Avatar image URL.
user (Optional[UserRef]) – User associated with this object.
role (Optional[str]) – Role.
organization (Optional[OrganizationSummary]) – Organization.
Initialize from API response data.
- class EnterpriseMember(data: Mapping[str, Any])
Bases:
APIObjectEnterprise member payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
role (Optional[str]) – Role.
url (Optional[str]) – API URL for this object.
user (Optional[UserRef]) – User associated with this object.
login (Optional[str]) – Account login name.
name (Optional[str]) – Display name.
avatar_url (Optional[str]) – Avatar image URL.
html_url (Optional[str]) – Web URL for this object.
Initialize from API response data.
- class Email(data: Mapping[str, Any])
Bases:
APIObjectEmail payload for the authenticated user.
- Variables:
email (Optional[str]) – Email address.
state (Optional[str]) – Current state value.
Initialize from API response data.
- class OAuthToken(data: Mapping[str, Any])
Bases:
APIObjectOAuth token payload.
- Variables:
access_token (Optional[str]) – OAuth access token.
expires_in (Optional[int]) – Lifetime of the token in seconds.
refresh_token (Optional[str]) – OAuth refresh token.
scope (Optional[str]) – OAuth scopes granted to the token.
created_at (Optional[str]) – Timestamp when this object was created.
Initialize from API response data.
- class EmptyResponse(data: Mapping[str, Any])
Bases:
APIObjectEmpty JSON object returned by some mutation endpoints.
Initialize from API response data.
- class ApiStatusResponse(data: Mapping[str, Any])
Bases:
APIObjectSimple success/error response containing a numeric code and message.
- Variables:
code (Optional[int]) – Numeric status code returned by the API.
msg (Optional[str]) – Message returned by the API.
Initialize from API response data.
- class PublicKey(data: Mapping[str, Any])
Bases:
APIObjectPublic SSH key payload.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
title (Optional[str]) – Title of the object.
key (Optional[str]) – Public key material.
created_at (Optional[str]) – Timestamp when this object was created.
url (Optional[str]) – API URL for this object.
Initialize from API response data.
- class UserEventProject(data: Mapping[str, Any])
Bases:
APIObjectProject summary embedded in user event responses.
- Variables:
main_repository_language (Optional[List[Any]]) – Primary languages reported for the repository.
star_count (Optional[int]) – Number of stars on the repository.
forks_count (Optional[int]) – Number of forks.
develop_mode (Optional[str]) – Development mode of the repository.
stared (Optional[bool]) – Whether the current user has starred the repository.
Initialize from API response data.
- class UserEventPushData(data: Mapping[str, Any])
Bases:
APIObjectPush event metadata embedded in user events.
- Variables:
commit_count (Optional[int]) – Number of commits included in the push event.
action (Optional[str]) – Action.
ref_type (Optional[str]) – Type of Git ref involved in the push event.
commit_from (Optional[str]) – Starting commit SHA for the push event.
commit_to (Optional[str]) – Ending commit SHA for the push event.
ref (Optional[str]) – Git ref name.
commit_title (Optional[str]) – Title of the primary commit in the push event.
Initialize from API response data.
- class UserEventLinks(data: Mapping[str, Any])
Bases:
APIObjectLink bundle embedded in user event responses.
- Variables:
project (Optional[str]) – Link to the related project.
action_type (Optional[str]) – Link to the action type resource.
Initialize from API response data.
- class UserEvent(data: Mapping[str, Any])
Bases:
APIObjectSingle activity event returned by the user events endpoint.
- Variables:
action (Optional[Union[int, str]]) – Action code reported for the event.
action_name (Optional[str]) – Human-readable action name.
author (Optional[UserRef]) – Author associated with this object.
author_id (Optional[Union[int, str]]) – ID of the event author.
author_username (Optional[str]) – Username of the event author.
created_at (Optional[str]) – Timestamp when this object was created.
project (Optional[UserEventProject]) – Project associated with the event.
project_id (Optional[Union[int, str]]) – ID of the related project.
project_name (Optional[str]) – Name of the related project.
push_data (Optional[UserEventPushData]) – Push metadata for push events.
_links (Optional[UserEventLinks]) – Related links for the event.
Initialize from API response data.
- class UserEventsResponse(data: Mapping[str, Any])
Bases:
APIObjectGrouped user events response keyed by date.
- Variables:
events (Optional[Dict[str, List[UserEvent]]]) – Events grouped by date.
next (Optional[str]) – URL or token used to fetch the next page.
Initialize from API response data.
- class RepositoryReviewerSettingsUpdate(data: Mapping[str, Any])
Bases:
APIObjectResponse returned after updating repository reviewer settings.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
Initialize from API response data.
- class RepositoryPermissionMode(data: Mapping[str, Any])
Bases:
APIObjectRepository member management mode.
- Variables:
memberMgntMode (Optional[int]) – Repository member management mode.
Initialize from API response data.
- class RepositoryPushConfig(data: Mapping[str, Any])
Bases:
APIObjectRepository push rules configuration.
- Variables:
reject_not_signed_by_gpg (Optional[bool]) – Whether unsigned commits are rejected.
commit_message_regex (Optional[str]) – Regular expression required for commit messages.
max_file_size (Optional[int]) – Maximum allowed file size for pushes.
skip_rule_for_owner (Optional[bool]) – Whether push rules are skipped for owners.
deny_force_push (Optional[bool]) – Whether force pushes are denied.
Initialize from API response data.
- class RepositoryUploadResult(data: Mapping[str, Any])
Bases:
APIObjectUploaded repository attachment metadata.
- Variables:
success (Optional[bool]) – Success.
path (Optional[str]) – Repository-relative or namespace path.
full_path (Optional[str]) – Full path for the object.
Initialize from API response data.
- class RepositorySettings(data: Mapping[str, Any])
Bases:
APIObjectRepository-level settings payload.
- Variables:
disable_fork (Optional[bool]) – Whether repository forking is disabled.
forbidden_developer_create_branch (Optional[bool]) – Whether developers are forbidden from creating branches.
forbidden_developer_create_tag (Optional[bool]) – Whether developers are forbidden from creating tags.
forbidden_committer_create_branch (Optional[bool]) – Whether committers are forbidden from creating branches.
forbidden_developer_create_branch_user_ids (Optional[str]) – User IDs exempted from the developer branch-creation restriction.
branch_name_regex (Optional[str]) – Regular expression required for branch names.
tag_name_regex (Optional[str]) – Regular expression required for tag names.
generate_pre_merge_ref (Optional[bool]) – Whether pre-merge refs are generated.
rebase_disable_trigger_webhook (Optional[bool]) – Whether rebases avoid triggering webhooks.
open_gpg_verified (Optional[bool]) – Whether OpenGPG verification is enabled.
include_lfs_objects (Optional[bool]) – Whether LFS objects are included.
forbidden_gitlab_access (Optional[bool]) – Whether GitLab access is forbidden.
Initialize from API response data.
- class PullRequestSettingDetail(data: Mapping[str, Any])
Bases:
APIObjectNested merge request setting payload in repository PR settings.
- Variables:
id (Optional[Union[int, str]]) – Unique identifier for this object.
project_id (Optional[Union[int, str]]) – Numeric ID of the related project.
disable_merge_by_self (Optional[bool]) – Whether users are prevented from merging pull requests they created.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
can_force_merge (Optional[bool]) – Whether administrators can force merge.
disable_squash_merge (Optional[bool]) – Whether squash merge is disabled.
approval_required_reviewers (Optional[int]) – Number of reviewers required before merge.
approval_required_approvers (Optional[int]) – Number of approvers required before merge.
add_notes_after_merged (Optional[bool]) – Whether notes are added after merge.
merged_commit_author (Optional[str]) – Author name used for merged commits.
mark_auto_merged_mr_as_closed (Optional[bool]) – Whether auto-merged pull requests are marked as closed.
delete_source_branch_when_merged (Optional[bool]) – Whether source branches are deleted after merge.
auto_squash_merge (Optional[bool]) – Whether squash merge is enabled by default.
squash_merge_with_no_merge_commit (Optional[bool]) – Whether squash merges omit a merge commit.
close_issue_when_mr_merged (Optional[bool]) – Whether related issues are closed when a pull request is merged.
can_reopen (Optional[bool]) – Whether merged or closed pull requests can be reopened.
is_check_cla (Optional[bool]) – Whether CLA checks are enabled.
approval_approvers (Optional[List[APIObject]]) – Available approver rules for the repository.
approval_testers (Optional[List[APIObject]]) – Available tester rules for the repository.
approval_required_testers (Optional[int]) – Number of testers required before merge.
is_allow_lite_merge_request (Optional[bool]) – Whether lightweight pull requests are allowed.
lite_merge_request_prefix_title (Optional[str]) – Title prefix used for lightweight pull requests.
Initialize from API response data.
- class PullRequestSettings(data: Mapping[str, Any])
Bases:
APIObjectRepository pull request settings payload.
- Variables:
merge_request_setting (Optional[PullRequestSettingDetail]) – Detailed pull request merge settings.
only_allow_merge_if_all_discussions_are_resolved (Optional[bool]) – Whether all discussions must be resolved before merge.
only_allow_merge_if_pipeline_succeeds (Optional[bool]) – Whether merges require a successful pipeline.
merge_method (Optional[str]) – Merge strategy configured for pull requests.
Initialize from API response data.
- class RepositoryTransferResult(data: Mapping[str, Any])
Bases:
APIObjectRepository transfer result payload.
- Variables:
new_owner (Optional[str]) – New owner.
new_name (Optional[str]) – New name.
Initialize from API response data.
- class RepositoryCustomizedRole(data: Mapping[str, Any])
Bases:
APIObjectCustomized repository role definition.
- Variables:
role_id (Optional[str]) – Identifier of the custom role.
access_level (Optional[int]) – Access level granted by the custom role.
role_name (Optional[str]) – Name of the custom role.
role_chinese_name (Optional[str]) – Chinese name of the custom role.
role_description (Optional[str]) – Description of the custom role.
role_type (Optional[str]) – Type of the custom role.
member_count (Optional[int]) – Number of members assigned to the custom role.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
Initialize from API response data.
- class RepositoryDownloadStatisticsDetail(data: Mapping[str, Any])
Bases:
APIObjectPer-day repository download statistics entry.
- Variables:
pdate (Optional[str]) – Date for this statistics entry.
repo_id (Optional[str]) – Repository ID.
total_dl_cnt (Optional[int]) – Total download count up to this date.
today_dl_cnt (Optional[int]) – Download count for this date.
Initialize from API response data.
- class RepositoryDownloadStatistics(data: Mapping[str, Any])
Bases:
APIObjectRepository download statistics payload.
- Variables:
download_statistics_detail (Optional[List[RepositoryDownloadStatisticsDetail]]) – Per-day download statistics entries.
download_statistics_total (Optional[int]) – Total downloads within the requested time range.
download_statistics_history_total (Optional[int]) – Historical total downloads for the repository.
Initialize from API response data.
- class ContributorStatisticsOverview(data: Mapping[str, Any])
Bases:
APIObjectAggregate contributor statistics summary.
- Variables:
additions (Optional[int]) – Additions.
deletions (Optional[int]) – Deletions.
total_changes (Optional[int]) – Total lines changed.
commit_count (Optional[int]) – Number of commits.
Initialize from API response data.
- class ContributorStatisticsEntry(data: Mapping[str, Any])
Bases:
APIObjectPer-day contributor statistics entry.
- Variables:
date (Optional[str]) – Date for this contribution statistics entry.
additions (Optional[int]) – Additions.
deletions (Optional[int]) – Deletions.
total_changes (Optional[int]) – Total lines changed on this date.
commit_count (Optional[int]) – Number of commits on this date.
Initialize from API response data.
- class ContributorStatistics(data: Mapping[str, Any])
Bases:
APIObjectContributor statistics payload returned by the repository statistics endpoint.
- Variables:
name (Optional[str]) – Display name.
email (Optional[str]) – Email address.
overview (Optional[ContributorStatisticsOverview]) – Aggregate contribution statistics.
contributions (Optional[List[ContributorStatisticsEntry]]) – Per-day contribution statistics.
Initialize from API response data.
- class PullRequestOperationLog(data: Mapping[str, Any])
Bases:
APIObjectPull request operation log entry.
- Variables:
content (Optional[str]) – Content returned for this object.
id (Optional[Union[int, str]]) – Unique identifier for this object.
action (Optional[str]) – Action recorded in the operation log.
merge_request_id (Optional[Union[int, str]]) – ID of the related pull request.
created_at (Optional[str]) – Timestamp when this object was created.
updated_at (Optional[str]) – Timestamp when this object was last updated.
discussion_id (Optional[str]) – ID of the related discussion.
project (Optional[str]) – Project identifier recorded in the log entry.
assignee (Optional[APIObject]) – Assignee metadata captured in the log entry.
proposer (Optional[APIObject]) – Proposer metadata captured in the log entry.
user (Optional[UserRef]) – User associated with this object.
Initialize from API response data.
- class PullRequestAssigneeCount(data: Mapping[str, Any])
Bases:
APIObjectResponse payload when assignees are added to a pull request.
- Variables:
assignees_number (Optional[int]) – Assignees number.
Initialize from API response data.
- class RepositoryCollaboratorCheck(data: Mapping[str, Any])
Bases:
APIObjectRepository collaborator presence check response.
- Variables:
message (Optional[str]) – Message text returned by the API.
Initialize from API response data.
- class SearchUser(data: Mapping[str, Any])
Bases:
APIObjectUser search result payload.
- Variables:
avatar_url (Optional[str]) – Avatar image URL.
created_at (Optional[str]) – Timestamp when this object was created.
html_url (Optional[str]) – Web URL for this object.
id (Optional[Union[int, str]]) – Unique identifier for this object.
login (Optional[str]) – Account login name.
name (Optional[str]) – Display name.
Initialize from API response data.