-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #485 from Zigje9/refactor/vscode-type
refactor(vscode): temp type 제거 및 engine 에서 가져온 타입 재정의
- Loading branch information
Showing
11 changed files
with
135 additions
and
90 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { StemCommitNode } from "./StemCommitNode"; | ||
|
||
interface CSMNode { | ||
base: StemCommitNode; | ||
source: StemCommitNode[]; | ||
} | ||
|
||
export interface CSMDictionary { | ||
[branch: string]: CSMNode[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { DiffStatistics } from "./DiffStatistics"; | ||
import type { GitHubUser } from "./GitHubUser"; | ||
|
||
export type Commit = { | ||
id: string; | ||
parentIds: string[]; | ||
author: GitHubUser; | ||
committer: GitHubUser; | ||
authorDate: string; | ||
commitDate: string; | ||
diffStatistics: DiffStatistics; | ||
message: string; | ||
tags: string[]; | ||
releaseTags: string[]; | ||
// fill necessary properties... | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const CommitMessageTypeList = [ | ||
"build", | ||
"chore", | ||
"ci", | ||
"docs", | ||
"feat", | ||
"fix", | ||
"pert", | ||
"refactor", | ||
"revert", | ||
"style", | ||
"test", | ||
]; | ||
|
||
const COMMIT_MESSAGE_TYPE = [...CommitMessageTypeList] as const; | ||
|
||
export type CommitMessageType = (typeof COMMIT_MESSAGE_TYPE)[number]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export type DiffStatistics = { | ||
changedFileCount: number; | ||
insertions: number; | ||
deletions: number; | ||
files: { | ||
[id: string]: { | ||
insertions: number; | ||
deletions: number; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
interface FileChanged { | ||
[path: string]: { | ||
insertionCount: number; | ||
deletionCount: number; | ||
}; | ||
} | ||
|
||
export interface DifferenceStatistic { | ||
totalInsertionCount: number; | ||
totalDeletionCount: number; | ||
fileDictionary: FileChanged; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export type GitHubUser = { | ||
id: string; | ||
names: string[]; | ||
emails: string[]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { Commit } from "./Commit"; | ||
|
||
const NODE_TYPE_NAME = ["COMMIT", "CLUSTER"] as const; | ||
type NodeTypeName = (typeof NODE_TYPE_NAME)[number]; | ||
|
||
type NodeBase = { | ||
nodeTypeName: NodeTypeName; | ||
// isRootNode: boolean; | ||
// isLeafNode: boolean; | ||
|
||
// getParents: () => NodeType[]; | ||
}; | ||
|
||
// Node = Commit + analyzed Data as node | ||
export type CommitNode = NodeBase & { | ||
nodeTypeName: "COMMIT"; | ||
commit: Commit; | ||
// seq: number; | ||
clusterId: number; // 동일한 Cluster 내부 commit 참조 id | ||
// hasMajorTag: boolean; | ||
// hasMinorTag: boolean; | ||
// isMergeCommit: boolean; | ||
}; | ||
|
||
export type ClusterNode = NodeBase & { | ||
nodeTypeName: "CLUSTER"; | ||
commitNodeList: CommitNode[]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { CommitMessageType } from "./CommitMessageType"; | ||
import type { DifferenceStatistic } from "./DifferenceStatistic"; | ||
|
||
interface GitUser { | ||
name: string; | ||
email: string; | ||
} | ||
|
||
interface CommitRaw { | ||
sequence: number; | ||
id: string; | ||
parents: string[]; | ||
branches: string[]; | ||
tags: string[]; | ||
author: GitUser; | ||
authorDate: Date; | ||
committer: GitUser; | ||
committerDate: Date; | ||
message: string; | ||
differenceStatistic: DifferenceStatistic; | ||
commitMessageType: CommitMessageType; | ||
} | ||
|
||
export interface StemCommitNode { | ||
// 순회 이전에는 stemId가 존재하지 않음. | ||
stemId?: string; | ||
commit: CommitRaw; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters