-
Notifications
You must be signed in to change notification settings - Fork 0
/
seed-flux_gitflow.js
276 lines (254 loc) · 5.29 KB
/
seed-flux_gitflow.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
var graphConfig = new GitGraph.Template({
colors: [ "#9993FF", "#47E8D4", "#6BDB52", "#F85BB5", "#FFA657", "#F85BB5" ],
branch: {
color: "#000000",
lineWidth: 3,
spacingX: 60,
mergeStyle: "straight",
showLabel: true, // display branch names on graph
labelFont: "normal 10pt Arial",
labelRotation: 0
},
commit: {
spacingY: -30,
dot: {
size: 8,
strokeColor: "#000000",
strokeWidth: 4
},
tag: {
font: "normal 10pt Arial",
color: "yellow"
},
message: {
color: "black",
font: "normal 12pt Arial",
displayAuthor: false,
displayBranch: false,
displayHash: false,
}
},
arrow: {
size: 8,
offset: 3
}
});
var config = {
template: graphConfig,
mode: "extended",
orientation: "vertical"
};
var bugFixCommit = {
messageAuthorDisplay: false,
messageBranchDisplay: false,
messageHashDisplay: false,
message: "Bug fix commit(s)"
};
var stabilizationCommit = {
messageAuthorDisplay: false,
messageBranchDisplay: false,
messageHashDisplay: false,
message: "Release stabilization commit(s)"
};
// You can manually fix columns to control the display.
var secfeatureCol = 1;
var featureCol = 2;
var tidyCol = 3;
var reviseCol = 3;
var reviewCol = 3;
var editCol = 3;
var fixCol = 4;
var masterCol = 5;
// start git graph
var gitgraph = new GitGraph(config);
// master branch
var master = gitgraph.branch({
name: "master",
column: masterCol
});
master.commit("Initial commit");
master.commit({
message: "Add yaml metadata",
tag: "time stamp",
displayTagBox: true
});
// edit branch
var edit = gitgraph.branch({
parentBranch: master,
name: "edit",
column: editCol
});
edit.commit({
messageDisplay: false
});
// alice feature branch on edit
var edit_feature1 = gitgraph.branch({
parentBranch: edit,
name: "alice/prelims",
column: featureCol
});
edit_feature1.commit("Edit abstract").commit({
messageDisplay: false
});
edit_feature1.commit("Edit keywords").commit({
messageDisplay: false
});
edit_feature1.merge(edit);
//edit.merge(master);
// judy feature branch on edit
var edit_feature2 = gitgraph.branch({
parentBranch: edit,
name: "judy/mainmatter",
column: featureCol
});
edit_feature2.commit("Edit introduction").commit({
messageDisplay: false
});
edit_feature2.commit("Edit equations").commit({
messageDisplay: false
});
edit_feature2.merge(edit);
edit.merge(master);
// Commits on master
master.commit({
tag: "time stamp",
displayTagBox: true
});
// fix branch
var fix1 = gitgraph.branch({
parentBranch: master,
name: "fix",
column: fixCol
});
fix1.commit("Fix bug #1").commit({
messageDisplay: false
});
fix1.commit("Fix bug #2").commit({
messageDisplay: false
});
fix1.merge(master);
// review branch
var review = gitgraph.branch({
parentBranch: master,
name: "review",
column: reviewCol
});
review.commit({
messageDisplay: false
});
//review.commit({
// messageDisplay: false
//});
// feature branch on review
var review_feature1 = gitgraph.branch({
parentBranch: review,
name: "bob/prelims",
column: featureCol
});
review_feature1.commit("Review on abstract").commit({
messageDisplay: false
});
review_feature1.commit("Review on keywords").commit({
messageDisplay: false
});
// fix branch
var fix2 = gitgraph.branch({
parentBranch: master,
name: "fix",
column: fixCol
});
fix2.commit("Fix bug #3").commit({
messageDisplay: false
});
fix2.commit("Fix bug #4").commit({
messageDisplay: false
});
fix2.merge(master);
fix2.merge(review);
review_feature1.merge(review);
review.merge(master);
// Commits on master
master.commit({
tag: "time stamp",
displayTagBox: true
});
// revise branch
var revise = gitgraph.branch({
parentBranch: master,
name: "revise",
column: reviseCol
});
revise.commit({
messageDisplay: false
});
//revise.commit({
// messageDisplay: false
//});
// feature branch on revise
var revise_feature1 = gitgraph.branch({
parentBranch: revise,
name: "eve/prelims",
column: featureCol
});
revise_feature1.commit("Revise abstract").commit({
messageDisplay: false
});
// feature branch on revise
var revise_feature2 = gitgraph.branch({
parentBranch: revise,
name: "trudy/tables",
column: secfeatureCol
});
revise_feature1.commit("Revise keywords").commit({
messageDisplay: false
});
revise_feature2.commit("Revise tables").commit({
messageDisplay: false
});
revise_feature2.commit("Revise tables again").commit({
messageDisplay: false
});
revise_feature2.merge(revise);
revise_feature1.commit("Revise abstract").commit({
messageDisplay: false
});
revise_feature1.merge(revise);
revise.merge(master);
// Commits on master
master.commit({
messageDisplay: false
});
master.commit({
messageDisplay: false
});
// tidy branch
var tidy = gitgraph.branch({
parentBranch: master,
name: "tidy",
column: tidyCol
});
tidy.commit({
messageDisplay: false
});
//tidy.commit({
// messageDisplay: false
//});
// feature branch on tidy
var tidy_feature1 = gitgraph.branch({
parentBranch: tidy,
name: "carol/abstract",
column: featureCol
});
tidy_feature1.commit("Tidy abstract").commit({
messageDisplay: false
});
tidy_feature1.commit("Tidy keywords").commit({
messageDisplay: false
});
tidy_feature1.merge(tidy);
tidy.merge(master);
// Commits on master
master.commit({
tag: "time stamp",
displayTagBox: true
});