Skip to content

Other types

This page lists other types used in the package. These types should not be imported directly but are used for attributes in event models.

Sub-models

The following models are used within event models to represent nested fields.

StDiff

diff

diff: str

new_path

new_path: str

old_path

old_path: str

a_mode

a_mode: str

b_mode

b_mode: str

new_file

new_file: bool

renamed_file

renamed_file: bool

deleted_file

deleted_file: bool

Note

note

note: str

noteable_type

noteable_type: str

author_id

author_id: int

project_id

project_id: int

line_code

line_code: Optional[str]

commit_id

commit_id: Optional[str] = None

noteable_id

noteable_id: Optional[int]

system

system: bool

st_diff

st_diff: Optional[StDiff] = None

action

action: Optional[str] = None

url

Label

title

title: Optional[str]

color

color: str

project_id

project_id: Optional[int]

template

template: bool

description

description: Optional[str] = None

type

type: str

group_id

group_id: Optional[int]

UserNameAndEmail

name

name: Optional[str] = None

email

email: Optional[EmailStr | Literal['[REDACTED]']] = None

User

username

username: Optional[str] = None

avatar_url

avatar_url: Optional[AnyHttpUrl] = None

Project

name

name: str

description

description: Optional[str] = None

web_url

web_url: str

avatar_url

avatar_url: Optional[AnyHttpUrl] = None

git_ssh_url

git_ssh_url: str

git_http_url

git_http_url: AnyHttpUrl

namespace

namespace: str

visibility_level

visibility_level: int

path_with_namespace

path_with_namespace: str

default_branch

default_branch: str

ci_config_path

ci_config_path: Optional[str] = None

Issue

title

title: Optional[str]

assignee_ids

assignee_ids: list[int]

assignee_id

assignee_id: Optional[int]

author_id

author_id: int

project_id

project_id: int

position

position: Optional[int] = None

description

description: Optional[str] = None

milestone_id

milestone_id: Optional[int]

state

state: str

iid

iid: int

labels

labels: list[Label]

CommitAuthor

name

name: str

email

email: str

Commit

id

id: str

message

message: str = ''

title

title: Optional[str] = ''

timestamp

timestamp: Datetime

url

author

author: CommitAuthor

MergeRequest

target_branch

target_branch: str

source_branch

source_branch: str

source_project_id

source_project_id: int

author_id

author_id: int

assignee_id

assignee_id: Optional[int]

title

title: Optional[str]

milestone_id

milestone_id: Optional[int]

state

state: str

merge_status

merge_status: str

target_project_id

target_project_id: int

iid

iid: int

description

description: Optional[str]

position

position: Optional[int] = None

labels

labels: list[Label]

source

source: Optional[Project]

target

target: Optional[Project]

last_commit

last_commit: Commit

draft

draft: bool

assignee

assignee: Optional[User] = None

detailed_merge_status

detailed_merge_status: str

Snippet

title

title: Optional[str]

description

description: str

content

content: str

author_id

author_id: int

project_id

project_id: int

file_name

file_name: str

type

type: str

visibility_level

visibility_level: int

url

Wiki

web_url

web_url: AnyHttpUrl

git_ssh_url

git_ssh_url: str

git_http_url

git_http_url: AnyHttpUrl

path_with_namespace

path_with_namespace: str

default_branch

default_branch: str

WikiPage

title

title: Optional[str]

content

content: str

format

format: str

message

message: str

slug

slug: str

url

action

action: str

diff_url

diff_url: AnyHttpUrl

version_id

version_id: str

PipelineVariable

key

key: str

value

value: str

Pipeline

iid

iid: int

name

name: str

ref

ref: str

tag

tag: bool

sha

sha: str

before_sha

before_sha: str

source

source: str

status

status: str

stages

stages: list[str]

created_at

created_at: Datetime

finished_at

finished_at: Datetime

duration

duration: int

variables

variables: list[PipelineVariable]

url

SourcePipelineProject

web_url

web_url: AnyHttpUrl

path_with_namespace

path_with_namespace: str

SourcePipeline

project

pipeline_id

pipeline_id: int

job_id

job_id: int

Runner

description

description: str

active

active: bool

runner_type

runner_type: str

is_shared

is_shared: bool

tags

tags: Optional[list[str]] = None

Environment

name

name: str

action

action: str

deployment_tier

deployment_tier: Optional[str] = None

FeatureFlag

name

name: str

description

description: Optional[str] = None

active

active: bool

EmojiAward

user_id

user_id: int

name

name: str

awardable_type

awardable_type: Optional[str] = None

awardable_id

awardable_id: Optional[int] = None

action

action: str

awarded_on_url

awarded_on_url: AnyHttpUrl

AccessToken

user_id

user_id: int

created_at

created_at: Datetime

name

name: str

expires_at

expires_at: Date

Utility types

The following types are used to capture quirks of the GitLab webhook model.

Datetime

Datetime = Annotated[
    AwareDatetime, BeforeValidator(_parse_datetime)
]

Date

Date = Annotated[date, BeforeValidator(_parse_date)]

Change

previous

previous: _T

current

current: _T