Skip to content

Commit 046fe27

Browse files
author
Tobias Brennecke
committed
Add branching scheme to contribution guidelines
1 parent eed159c commit 046fe27

File tree

5 files changed

+277
-8
lines changed

5 files changed

+277
-8
lines changed

.github/CONTRIBUTING.md

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,41 @@
1-
# Contributing to Patternlab Node
1+
Contributing to Patternlab Node
2+
===============================
3+
24
If you'd like to contribute to Pattern Lab Node, please do so! There is always a lot of ground to cover and something for your wheelhouse.
35

46
No pull request is too small. Check out any [up for grabs issues](https://github.com/pattern-lab/patternlab-node/labels/up%20for%20grabs) as a good way to get your feet wet, or add some more unit tests.
57

6-
## Guidelines
7-
1. Please keep your pull requests concise and limited to **ONE** substantive change at a time. This makes reviewing and testing so much easier.
8-
2. _ALWAYS_ submit pull requests against the [dev branch](https://github.com/pattern-lab/patternlab-node/tree/dev). If this does not occur, I will first, try to redirect you gently, second, port over your contribution manually if time allows, and/or third, close your pull request. If you have a major feature to stabilize over time, talk to @bmuenzenmeyer about making a dedicated `feature-branch`
9-
3. If you can, add some unit tests using the existing patterns in the `./test` directory
8+
Guidelines
9+
----------
10+
11+
1. Please keep your pull requests concise and limited to **ONE** substantive change at a time. This makes reviewing and testing so much easier.
12+
2. *ALWAYS* submit pull requests against the [dev branch](https://github.com/pattern-lab/patternlab-node/tree/dev). If this does not occur, I will first, try to redirect you gently, second, port over your contribution manually if time allows, and/or third, close your pull request. If you have a major feature to stabilize over time, talk to @bmuenzenmeyer about making a dedicated `feature-branch`
13+
3. If you can, add some unit tests using the existing patterns in the `./test` directory
14+
4. Please mention the issue number in commits if you can, so anyone can see to which issue your changes belong to. For instance:
15+
- `#123 Fix resolving patterns in pattern_hunter`
16+
- `Feature #42: improve improbability drive`
17+
18+
Coding style
19+
------------
1020

11-
##Coding style
1221
Two files combine within the project to define and maintain our coding style.
1322

14-
* The `.editorconfig` controls spaces / tabs within supported editors. Check out their [site](http://editorconfig.org/).
15-
* The `.eslintrc` defines our javascript standards. Some editors will evaluate this real-time - otherwise it's run using `grunt|gulp build`
23+
- The `.editorconfig` controls spaces / tabs within supported editors. Check out their [site](http://editorconfig.org/).
24+
- The `.eslintrc` defines our javascript standards. Some editors will evaluate this real-time - otherwise it's run using `grunt|gulp build`
25+
26+
Branching Scheme
27+
----------------
28+
29+
![alt text](branching-scheme.png) While activilely maintaining `2.X` on `master`, there is heavy development going on for Patternlab `3.X`. Currently Pattern Lab has the following branches:
30+
31+
- **master** contains the latext stable, released `2.X` version</dd>
32+
- **dev**: for `2.X` development. Please target pull requests against this branch
33+
- **dev-3.0** Development branch for version `3.0`. Pattern Lab has undergone some major changes and the source trees have diverged a lot and we will try to forward-port any changes made in `2.X`
34+
- **feature-branches** for larger changes. Allows merging all changes into both `2.X` and `3.X` easily.
35+
- **long running branches** for changes that involve major changes to the code, architecture and take a lot of time (i.e. making Pattern Lab async)
36+
37+
Development mainly happens in the `dev` branch, but you can help us a lot if you also do a pull request against `dev-3.0`. When `dev` seems stable enough, we do releases of `2.X` by merging `dev` to `master` and creating a release tag.
38+
39+
Feature branches may target either `dev` and/or `dev-3.0` and should be updated regularly.
40+
41+
Long running branches should only target the latest version of Pattern Lab, currently `dev-3.0`, and may be lagging behind a lot.

.github/branching-scheme.png

49.9 KB
Loading

.github/gitgraph/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Generating a new graph
2+
======================
3+
4+
This folder uses http://gitgraphjs.com/ for generating the git graph model.
5+
6+
To generate a new one, install `gitgraph.js` via `bower`.
7+
8+
```
9+
bower install gitgraph.js
10+
```
11+
12+
1. Change `patternlab-flow.js` to your needs according to the documentation on http://gitgraphjs.com/
13+
2. Open branching-scheme.html in browse, right click the graph and "Save as...".
14+
3. Overwrite `/.github/branching-scheme.png`
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<link rel="stylesheet" type="text/css" href="bower_components/gitgraph.js/build/gitgraph.css" />
5+
<style>
6+
body {
7+
margin: 0;
8+
padding: 0;
9+
}
10+
</style>
11+
</head>
12+
<body>
13+
<canvas id="gitGraph"></canvas>
14+
<script src="bower_components/gitgraph.js/build/gitgraph.js"></script>
15+
<script src="plflow.js"></script>
16+
</body>
17+
</head>

.github/gitgraph/patternlab-flow.js

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
var graphConfig = new GitGraph.Template({
2+
colors: [ "#9993FF", "#47E8D4", "#6BDB52", "#F85BB5", "#FFA657", "#FFCCAA", "#F85BB5" ],
3+
branch: {
4+
lineWidth: 3,
5+
spacingX: 60,
6+
mergeStyle: "straight",
7+
showLabel: true, // display branch names on graph
8+
labelFont: "normal 10pt Arial",
9+
labelRotation: 0,
10+
color: "black"
11+
},
12+
commit: {
13+
spacingY: -30,
14+
dot: {
15+
size: 8,
16+
strokeColor: "#000000",
17+
strokeWidth: 4
18+
},
19+
tag: {
20+
font: "normal 10pt Arial",
21+
color: "yellow"
22+
},
23+
message: {
24+
color: "black",
25+
font: "normal 12pt Arial",
26+
displayAuthor: false,
27+
displayBranch: false,
28+
displayHash: false,
29+
}
30+
},
31+
arrow: {
32+
size: 8,
33+
offset: 3,
34+
35+
}
36+
});
37+
38+
var config = {
39+
template: graphConfig,
40+
mode: "extended",
41+
orientation: "horizontal"
42+
};
43+
44+
var bugFixCommit = {
45+
messageAuthorDisplay: false,
46+
messageBranchDisplay: false,
47+
messageHashDisplay: false,
48+
message: "Bug fix commit(s)"
49+
};
50+
51+
var stabilizationCommit = {
52+
messageAuthorDisplay: false,
53+
messageBranchDisplay: false,
54+
messageHashDisplay: false,
55+
message: "Release stabilization commit(s)"
56+
};
57+
58+
// You can manually fix columns to control the display.
59+
var i = 0;
60+
var longRunningCol = i++;
61+
var featureV3Col = i++;
62+
var developV3Col = i++;
63+
var featureCol = i++;
64+
var developCol = i++;
65+
var releaseCol = i++;
66+
var masterCol = i++;
67+
68+
var gitgraph = new GitGraph(config);
69+
70+
var master = gitgraph.branch({
71+
name: "master",
72+
column: masterCol
73+
});
74+
master.commit("Initial commit");
75+
76+
var develop = gitgraph.branch({
77+
parentBranch: master,
78+
name: "dev",
79+
column: developCol
80+
});
81+
82+
var developV3 = gitgraph.branch({
83+
parentBranch: master,
84+
name: "dev-3.0",
85+
column: developV3Col
86+
});
87+
88+
89+
var longRunning = gitgraph.branch({
90+
parentBranch: master,
91+
name: "long-running-improvement",
92+
column: longRunningCol
93+
});
94+
95+
develop.commit({
96+
messageDisplay: false
97+
});
98+
developV3.commit({
99+
messageDisplay: false
100+
});
101+
102+
longRunning.commit({
103+
messageDisplay: false
104+
});
105+
longRunning.merge(developV3);
106+
107+
var feature1 = gitgraph.branch({
108+
parentBranch: develop,
109+
name: "feature/1-description",
110+
column: featureCol
111+
});
112+
feature1.commit("#1 A feature to go into v2.8.0").commit({
113+
messageDisplay: false
114+
});
115+
develop.merge(feature1);
116+
feature1.commit("Small Bugfix").commit({
117+
messageDisplay: false
118+
});
119+
feature1.merge(develop);
120+
121+
122+
var feature3X = gitgraph.branch({
123+
parentBranch: developV3,
124+
name: "feature/42-feature-for-3-x-only",
125+
column: featureV3Col
126+
});
127+
feature3X.commit("#42 A feature to go into v3.X").commit({
128+
messageDisplay: false
129+
});
130+
feature3X.merge(developV3);
131+
132+
133+
var feature2 = gitgraph.branch({
134+
parentBranch: develop,
135+
name: "feature/2-description",
136+
column: featureCol
137+
});
138+
feature2.commit("#2 Another feature to go into v2.8.0").commit({
139+
messageDisplay: false
140+
});
141+
feature2.merge(develop);
142+
feature2.merge(developV3);
143+
144+
develop.merge(master,{
145+
dotStrokeWidth: 10,
146+
message: "Release v2.8.1 tagged",
147+
tag: "v2.8.1"
148+
});
149+
150+
151+
develop.commit({
152+
messageDisplay: false
153+
});
154+
155+
156+
longRunning.commit({
157+
messageDisplay: false
158+
});
159+
160+
developV3.merge(longRunning);
161+
162+
longRunning.commit({
163+
messageDisplay: false
164+
});
165+
166+
var feature3 = gitgraph.branch({
167+
parentBranch: develop,
168+
name: "bugfix/3-description",
169+
column: featureCol
170+
});
171+
172+
feature3.commit("A feature to go into v2.8.0").commit({
173+
messageDisplay: false
174+
});
175+
feature3.merge(develop);
176+
177+
longRunning.merge(developV3);
178+
179+
developV3.commit({
180+
messageDisplay: false,
181+
dotStrokeWidth: 10
182+
});
183+
184+
185+
develop.commit({
186+
messageDisplay: false
187+
});
188+
189+
develop.commit({
190+
messageDisplay: false
191+
});
192+
193+
develop.merge(master, {
194+
dotStrokeWidth: 10,
195+
message: "Release v2.9.0 tagged",
196+
tag: "v2.9.0"
197+
});
198+
199+
develop.commit({
200+
messageDisplay: false,
201+
dotStrokeWidth: 10
202+
});
203+
204+
developV3.checkout();
205+
206+
/*
207+
developV3.merge(master, {
208+
dotStrokeWidth: 10,
209+
message: "Release v3.0.0 tagged",
210+
tag: "v3.0.0"
211+
});
212+
*/

0 commit comments

Comments
 (0)