Skip to content
Snippets Groups Projects
Commit f88abb69 authored by michael.minelli's avatar michael.minelli
Browse files

Types => Add type for Gitlab pipelines

parent bf9d1563
No related branches found
No related tags found
No related merge requests found
import GitlabPipelineStatus from './GitlabPipelineStatus';
import GitlabPipelineSource from './GitlabPipelineSource';
import GitlabUser from './GitlabUser';
interface GitlabPipeline {
id: number,
iid: number,
project_id: number,
status: GitlabPipelineStatus,
source: GitlabPipelineSource,
ref: string,
sha: string,
before_sha: string,
tag: boolean,
name: string,
yaml_errors: string | null,
user: GitlabUser,
web_url: string,
created_at: string,
updated_at: string,
started_at: string | null,
finished_at: string | null,
committed_at: string | null,
duration: number | null,
queued_duration: number | null,
coverage: string | null,
}
export default GitlabPipeline;
\ No newline at end of file
enum GitlabPipelineSource {
PUSH = 'push',
WEB = 'web',
TRIGGER = 'trigger',
SCHEDULE = 'schedule',
API = 'api',
EXTERNAL = 'external',
PIPELINE = 'pipeline',
CHAT = 'chat',
WEBIDE = 'webide',
MERGE_REQUEST = 'merge_request_event',
EXTERNAL_PULL_REQUEST = 'external_pull_request_event',
PARENT_PIPELINE = 'parent_pipeline',
ON_DEMAND_DAST_SCAN = 'ondemand_dast_scan',
ON_DEMAND_DAST_VALIDATION = 'ondemand_dast_validation',
}
export default GitlabPipelineSource;
enum GitlabPipelineStatus {
CREATED = 'created',
WAITING_FOR_RESOURCE = 'waiting_for_resource',
PREPARING = 'preparing',
PENDING = 'pending',
RUNNING = 'running',
SUCCESS = 'success',
FAILED = 'failed',
CANCELED = 'canceled',
SKIPPED = 'skipped',
MANUAL = 'manual',
SCHEDULED = 'scheduled'
}
export default GitlabPipelineStatus;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment