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