mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-03 23:56:44 +02:00
fixed tags for gitGraph
This commit is contained in:
@@ -279,7 +279,7 @@ export const merge = (
|
||||
export const cherryPick = function (
|
||||
sourceId: string,
|
||||
targetId: string,
|
||||
tags: string[],
|
||||
tags: string[] | undefined,
|
||||
parentCommitId: string
|
||||
) {
|
||||
log.debug('Entering cherryPick:', sourceId, targetId, tags);
|
||||
|
@@ -45,8 +45,9 @@ const parseStatement = (statement: any) => {
|
||||
const parseCommit = (commit: CommitAst) => {
|
||||
const id = commit.id;
|
||||
const message = commit.message ?? '';
|
||||
const tags = commit.tags ?? [];
|
||||
const tags = commit.tags ?? undefined;
|
||||
const type = commit.type !== undefined ? commitType[commit.type] : 0;
|
||||
log.info(`Commit: ${id} ${message} ${type}`);
|
||||
db.commit(message, id, type, tags);
|
||||
};
|
||||
|
||||
@@ -59,7 +60,7 @@ const parseBranch = (branch: BranchAst) => {
|
||||
const parseMerge = (merge: MergeAst) => {
|
||||
const branch = merge.branch;
|
||||
const id = merge.id ?? '';
|
||||
const tags = merge.tags ?? [];
|
||||
const tags = merge.tags ?? undefined;
|
||||
const type = merge.type !== undefined ? commitType[merge.type] : 0;
|
||||
db.merge(branch, id, type, tags);
|
||||
};
|
||||
@@ -71,7 +72,7 @@ const parseCheckout = (checkout: CheckoutAst) => {
|
||||
|
||||
const parseCherryPicking = (cherryPicking: CherryPickingAst) => {
|
||||
const id = cherryPicking.id;
|
||||
const tags = cherryPicking.tags ?? [];
|
||||
const tags = cherryPicking.tags ?? undefined;
|
||||
const parent = cherryPicking.parent;
|
||||
db.cherryPick(id, '', tags, parent);
|
||||
};
|
||||
|
@@ -5,7 +5,7 @@ export interface Commit {
|
||||
message: string;
|
||||
seq: number;
|
||||
type: number;
|
||||
tags: string[] | undefined;
|
||||
tags: string[];
|
||||
parents: (string | null)[];
|
||||
branch: string;
|
||||
customType?: number;
|
||||
|
@@ -45,7 +45,6 @@ Statement
|
||||
| CherryPicking
|
||||
;
|
||||
|
||||
|
||||
Direction:
|
||||
dir=('LR' | 'TB' | 'BT');
|
||||
|
||||
@@ -57,7 +56,7 @@ Commit:
|
||||
(
|
||||
'id:' id=STRING
|
||||
|'msg:'? message=STRING
|
||||
|'tag:' tags=STRING
|
||||
|'tag:' tags+=STRING
|
||||
|'type:' name=('NORMAL' | 'REVERSE' | 'HIGHLIGHT')
|
||||
)* EOL;
|
||||
Branch:
|
||||
@@ -69,7 +68,7 @@ Merge:
|
||||
'merge' branch=(ID|STRING)
|
||||
(
|
||||
'id:' id=STRING
|
||||
|'tag:' tags=STRING
|
||||
|'tag:' tags+=STRING
|
||||
|'type:' name=('NORMAL' | 'REVERSE' | 'HIGHLIGHT')
|
||||
)* EOL;
|
||||
|
||||
@@ -80,7 +79,7 @@ CherryPicking:
|
||||
'cherry-pick'
|
||||
(
|
||||
'id:' id=STRING
|
||||
|'tag:' tags=STRING
|
||||
|'tag:' tags+=STRING
|
||||
|'parent:' id=STRING
|
||||
)* EOL;
|
||||
|
||||
|
Reference in New Issue
Block a user