// 接口返回的类型
export enum CodingMergeRequestState {
	CANMERGE = 'CANMERGE', // 可自动合并，但未合并
	ACCEPTED = 'ACCEPTED', // 已合并
	CANNOTMERGE = 'CANNOTMERGE', //	不可自动合并，如代码冲突
	REFUSED = 'REFUSED', //	状态已拒绝、已关闭
	CANCEL = 'CANCEL', // 取消
	MERGING = 'MERGING', //	正在合并中
	ABNORMAL = 'ABNORMAL', // 状态异常
}

export interface MergeRequestState {
	mergeId: number;
	depotId: number;
	title: string;
	url: string;
	description: string;
	createdAt: string;
	updatedAt: string;
	base: string;
	head: string;
	commitsCount: number;
	canEdit: boolean;
	hasWritePermission: boolean;
	pendingCommentText?: string;
	pendingCommentDrafts?: { [key: string]: string };
	status: CodingMergeRequestState;
	conflicts: string[];
	// mergeable: PullRequestMergeability;
	// reviewers: ReviewState[];
	isAuthor?: boolean;
	author: {
		id: number;
		name: string;
	};
	currentUser: {
		id: number;
		name: string;
	};
}
