const { createGitgraph, templateExtend, DefaultTemplate } = GitgraphJS; const options = { commitMessage: ' ', template: templateExtend(DefaultTemplate, { colors: [ '#008fb5', // upstream '#2056a6', // 1.8 '#2a9d8f', // 1.9 '#264653', // develop '#9d2a37', // fix-nasty-bug ], commit: { spacing: 50, dot: { size: 12, }, message: { displayAuthor: false, font: "bold 12pt Arial", }, }, branch: { lineWidth: 8, label: { font: 'bold 12pt Arial', }, }, }), }; const graphContainer = document.getElementById("graph-container"); const gitgraph = createGitgraph(graphContainer, options); // // Don't know why this doesn't work :( // const upstream = gitgraph.branch({ // name: 'origin/upstream', // commitDefaultOptions: { subject: 'Upstream change...' }, // }); const upstream = gitgraph.branch('origin/upstream'); upstream.commit({ hash: '2e049fd', subject: '...multiple upstream commits...', style: { dot: { size: 0 }, message: { displayHash: false, font: 'italic 12pt Arial' }, }}); upstream.commit({ hash: '', subject: 'Upstream change...' }); upstream.commit({ hash: 'e6a31c8', subject: 'Upstream change...' }); const rel18 = gitgraph.branch({ name: 'origin/release/1.8', style: { label: { display: false } } }); rel18.commit({ hash: 'cf16fbb', subject: 'WBSTACK MODIFICATIONS' }); rel18.commit({ hash: '8259860', subject: '...several wbstack commits...', style: { dot: { size: 0 }, message: { displayHash: false, font: 'italic 12pt Arial' }, }}); rel18.commit({ hash: '50b3e07', subject: 'Bump actions/cache to v4 (#300)' }); rel18.commit({ hash: 'ddfeb6e', subject: 'Use node:18 as docker builder' }); rel18.commit({ hash: '2d6f452', subject: 'Update CHANGELOG for 1.8' }).tag('1.8'); upstream.commit({ hash: 'a9ed76a', subject: 'Upstream change...' }); upstream.commit({ hash: '70a16a9', subject: '...multiple upstream commits...', style: { dot: { size: 0 }, message: { displayHash: false, font: 'italic 12pt Arial' }, }}); upstream.commit({ hash: 'eeed4e0', subject: 'Upstream change...' }); const rel19 = gitgraph.branch({ name: 'origin/release/1.9', style: { label: { display: false } } }); rel19.commit({ hash: '6de92d9', subject: 'WBSTACK MODIFICATIONS' }); rel19.commit({ hash: 'e58f6e5', subject: '...several wbstack commits...', style: { dot: { size: 0 }, message: { displayHash: false, font: 'italic 12pt Arial' }, }}); rel19.commit({ hash: 'e308d0d', subject: 'Use node:18 as docker builder' }); rel19.commit({ hash: 'bd4b49d', subject: 'Update CHANGELOG for 1.8' }); rel19.commit({ hash: 'dc7aecb', subject: 'Temporary revert of "Change selectors for query examples"' }); rel19.commit({ hash: 'bcc61bf', subject: 'Update CHANGELOG for 1.9' }).tag('1.9'); upstream.commit({ hash: '499f862', subject: 'Upstream change...' }); upstream.commit({ hash: '7dfaac4', subject: '...multiple upstream commits...', style: { dot: { size: 0 }, message: { displayHash: false, font: 'italic 12pt Arial' }, }}); upstream.commit({ hash: 'd3318c7', subject: 'Upstream change...' }); const develop = gitgraph.branch("origin/develop"); develop.commit({ hash: 'c29340a', subject: 'WBSTACK MODIFICATIONS' }); develop.commit({ hash: '6b99dcc', subject: '...several wbstack commits...', style: { dot: { size: 0 }, message: { displayHash: false, font: 'italic 12pt Arial' }, }}); develop.commit({ hash: 'e8c1b04', subject: 'Temporary revert of "Change selectors for query examples"' }); develop.commit({ hash: '46f5962', subject: 'Update CHANGELOG for 1.9' }); develop.commit({ hash: '5bca7af', subject: 'Bump @wdio/cli from 7.36.0 to 9.17.1 (#314)' }); const feature = gitgraph.branch("origin/fix-nasty-bug"); feature.commit({ hash: 'ffa7158', subject: 'Fix some bug' }); develop.merge({ branch: feature, commitOptions: { hash: '8859a10', subject: 'Merge branch fix-nasty-bug (#321)', }}); // develop.commit({ hash: '51c85ac', subject: 'Update CHANGELOG for 1.10' }); upstream.commit({ hash: '67fa3ab', subject: 'Upstream change...' });