A Pen by Nicolas Carlo on CodePen.
Last active
December 9, 2019 18:48
-
-
Save nullfieldio/2f227c987c0ff0affd0e2931b61421e1 to your computer and use it in GitHub Desktop.
@gitgraph/js playground
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
<div id="graph-container"></div> |
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
const graphContainer = document.getElementById("graph-container"); | |
const options = { | |
author: "rabbit <[email protected]>", | |
}; | |
// Instantiate the graph. | |
const gitgraph = GitgraphJS.createGitgraph(graphContainer,options); | |
// Simulate git commands with Gitgraph API. | |
const master = gitgraph.branch("master"); | |
master.commit("QCR Release 2019.12"); | |
master.tag("QCR Release 2019.12"); | |
const release = gitgraph.branch("qcr/2019.13"); | |
release.commit("Initial Creation of release branch qcr-2019.13"); | |
const aFeature = gitgraph.branch("BUG-1234"); | |
aFeature | |
.commit("Fix it") | |
.commit("Fix it for realz") | |
.commit("Make it faster"); | |
release.merge(aFeature); | |
release.commit("QCR Release 2019.13"); | |
master.merge(release).tag("qcr-2019.13"); | |
const release2 = gitgraph.branch("qcr/2019.14"); | |
//release2.commit("Initial Creation of release branch qcr-2019.14"); |
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
<script src="https://cdn.jsdelivr.net/npm/@gitgraph/js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment