109 lines
2.0 KiB
TypeScript
109 lines
2.0 KiB
TypeScript
export enum MR_STATE {
|
|
ALL = 'all',
|
|
OPENED = 'opened',
|
|
MERGED = 'merged',
|
|
CLOSED = 'closed',
|
|
LOCKED = 'locked',
|
|
}
|
|
|
|
export enum MR_SCOPE {
|
|
ALL = 'all',
|
|
CREATED_BY_ME = 'created_by_me',
|
|
ASSIGNED_TO_ME = 'assigned_to_me',
|
|
NEED_MY_REVIEW = 'need_my_review',
|
|
}
|
|
|
|
export enum SORTBY {
|
|
DESC = 'desc',
|
|
ASC = 'asc',
|
|
}
|
|
|
|
export const sortBy = [
|
|
{ label: '最近', value: 'desc' },
|
|
{ label: '较早', value: 'asc' }
|
|
];
|
|
|
|
export enum MRORDERBY {
|
|
CREATED_AT = 'created_at',
|
|
UPDATED_AT = 'updated_at',
|
|
MERGED_AT = 'merged_at'
|
|
}
|
|
|
|
export const mrOrderBy = [
|
|
{ label: '创建', value: 'created_at' },
|
|
{ label: '更新', value: 'updated_at' }
|
|
// { label: '合并', value: 'merged_at' }
|
|
];
|
|
|
|
export const mrStateOption = {
|
|
opened: {
|
|
icon: 'gt-merge-request',
|
|
label: '已开启',
|
|
color: 'var(--color-Y500,#F5AB0B)',
|
|
bgColor: 'rgba(245,171,11,0.1)'
|
|
},
|
|
closed: {
|
|
icon: 'gt-skip-merge',
|
|
label: '已关闭',
|
|
color: 'var(--color-G600,#9A9B9C)',
|
|
bgColor: 'rgba(154,155,156,0.1)'
|
|
},
|
|
merged: {
|
|
icon: 'gt-closed-merge',
|
|
label: '已合并',
|
|
color: 'var(--color-GN500,#0EB07B)',
|
|
bgColor: 'rgb(230, 247, 241)'
|
|
}
|
|
};
|
|
|
|
export enum MR_EVENT {
|
|
TITLE = 'title',
|
|
DESCRIPTION = 'description',
|
|
ASSIGNEE = 'assignee',
|
|
LOCKED = 'locked',
|
|
CLOSED = 'closed',
|
|
UNLOCKED = 'unlocked',
|
|
OPENED = 'opened',
|
|
MILESTONE = 'milestone',
|
|
MERGED = 'merged',
|
|
MR_CHANGE = 'mr_change',
|
|
DISCUSSION = 'discussion',
|
|
LABEL = 'label',
|
|
}
|
|
|
|
export const mrEventOption = {
|
|
title: {
|
|
icon: 'gt-plane-edit'
|
|
},
|
|
description: {
|
|
icon: 'gt-plane-edit'
|
|
},
|
|
assignee: {
|
|
icon: 'gt-plane-users'
|
|
},
|
|
locked: {
|
|
icon: 'gt-plane-lock'
|
|
},
|
|
closed: {
|
|
icon: 'gt-plane-skip1'
|
|
},
|
|
unlocked: {
|
|
icon: 'gt-plane-openlock1'
|
|
},
|
|
opened: {
|
|
icon: 'gt-plane-issues'
|
|
},
|
|
milestone: {
|
|
icon: 'gt-plane-topics'
|
|
},
|
|
merged: {
|
|
icon: 'plane-merge'
|
|
},
|
|
mr_change: {
|
|
icon: 'gt-plane-users'
|
|
},
|
|
label: {
|
|
icon: 'gt-plane-tag'
|
|
}
|
|
};
|