Created
April 1, 2020 12:02
-
-
Save valentinsavenko/cec0da054cd1d289efd54ef71877ac8c to your computer and use it in GitHub Desktop.
@gitgraph/js Sigi-Flow
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"); | |
// Instantiate the graph. | |
const gitgraph = GitgraphJS.createGitgraph(graphContainer); | |
// Simulate git commands with Gitgraph API. | |
const develop = gitgraph.branch("develop"); | |
develop.commit({ subject: "first ever commit", author:'' }); | |
const saas = develop.branch("saas"); | |
const releaseCandidateOld = develop.branch("release-candidate-13.14.0"); | |
releaseCandidateOld.commit({ subject: "Fix random bug found by qa", author:'' }); | |
saas.merge(releaseCandidateOld); | |
develop.commit({ subject: "nice feature for 13.15.0-next", author:'' }); | |
develop.commit({ subject: "nice feature2 for 13.15.0-next", author:'' }); | |
develop.commit({ subject: "nice feature2 for 13.15.0-next", author:'' }); | |
develop.commit({ subject: "nice stable version of develop", author:'' }); | |
const releaseCandidate = develop.branch({ name:"release-candidate-13.15.0", author:''}); | |
releaseCandidate | |
.commit({ subject: "bump version to release -> 13.15.0", author:'' }) | |
.commit({ subject: "Fix random bug found by qa", author:'' }) | |
.commit({ subject: "move button by 1 pixel for PO", author:'' }); | |
const hotfix = saas.branch({ name:"Hotfix-13.14.1", author:'' }); | |
hotfix.commit({ subject: "Hotfix to fix important bug 13.15.1", author:'' }); | |
saas.merge(hotfix); | |
releaseCandidate.merge(hotfix); | |
saas.merge(releaseCandidate).tag('13.15.0'); | |
develop.merge(saas); | |
releaseCandidate.commit("bump version to 13.16.0-next"); | |
develop.merge(releaseCandidate); |
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