Skip to content

Commit a3e5cbf

Browse files
author
Nick Yeates
authored
Add technical steps to CONTRIBUTE.md
Merge pull request #25 from paypal/contributing_tech_steps
2 parents ca64acf + a7728d8 commit a3e5cbf

File tree

3 files changed

+157
-28
lines changed

3 files changed

+157
-28
lines changed

CONTRIBUTING.md

Lines changed: 136 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ There are two separate repositories needed for this workflow:
99
* [InnerSourcePatterns][patternsRepo]
1010
* [InnerSourceCommons][commonsRepo]
1111

12-
### InnerSourcePatterns repository
12+
## InnerSourcePatterns repository
1313

1414
This is a private repository where new ideas, donuts and patterns are published
1515
and reviewed by the patterns community **prior to** publishing them on
16-
[innersourcecommons.org][commons] ,Inside of this
16+
[innersourcecommons.org][commons]. Inside of this
1717
repository we're using the standard GitHub workflow where we have one main
1818
branch - the master branch. Contributions are done via fork and pull-requests.
1919

20-
### InnerSourceCommons repository
20+
## InnerSourceCommons repository
2121

2222
This is where ideas, donuts and patterns will be published **after** they have
2323
been reviewed and accepted by the reviewers. Inside of this repository we're
@@ -29,45 +29,153 @@ contains the sources for the GitHub pages website for innersourcecommons.org.
2929

3030
### Working inside of the InnerSourcePatterns repository
3131

32-
# [Create an issue] for each new idea, donut or pattern in the
32+
1. [Create an issue] for each new idea, donut or pattern in the
3333
[patterns repository][patternsRepo]. The issue should
3434
* contain the name of the pattern,
3535
* contain a short description (at least the problem) and
3636
* be labeled with the appropriate label (_idea_, _donut_, _pattern_)
37-
# Create a new branch either in your clone or fork of the
37+
2. Create a new branch either in your clone or fork of the
3838
[patterns repository][patternsRepo]. Please use the following pattern for
3939
naming branches: `pattern/<patternName>`. Example:
4040
`pattern/contractedContributor`.
41-
# Create a _Markdown_ file with the description of the _idea_, _donut_ or
41+
3. Create a _Markdown_ file with the description of the _idea_, _donut_ or
4242
_pattern_ and store it in the main directory. Commit and push.
43-
# Once your contribution is ready to be reviewed, create a pull request
44-
targeted at `master` and label it with either _idea_, _donut_ or _pattern_
45-
and _Ready for Review_.
46-
# Reviewer can now use the PR features to comment on the pattern.
47-
# After the review is complete, the reviewers should remove the label
48-
_Ready for Review_ and label the pattern _Accepted_ or don't apply any label
49-
in case rework is necessary.
50-
# In case of required rework, the author should apply the labels
51-
_Ready for Review_ and _Revised_ to indicate that a 2nd review is requested.
52-
# Once a pattern was labeled _Accepted_ by the reviewers, one of the TCs of the
43+
4. Once your contribution is ready to be reviewed, create a pull request (PR)
44+
targeted at `master` and label it with _pattern_. Additionally decide whether
45+
to label it with _idea_, _donut_, or _draft_ and _Ready for Review_ or _Incomplete_
46+
5. Reviewers can now use the PR features to comment on the pattern.
47+
6. In case of required rework, the author should apply the labels
48+
_Ready for Additional Review_ and/or _Revised_ to indicate that a 2nd review is requested.
49+
7. After reviews are complete, the reviewers or author should remove the label
50+
_Ready for Review_ and label the pattern _Accepted_.
51+
8. Once a pattern is labeled _Accepted_ by the reviewers, one of the TCs of the
5352
[patterns repository][patternsRepo] will then move the pattern to either the
54-
`ideas`, `donuts` or `patterns` subdirectories, merge it to `master` and
53+
`ideas`, `donuts` or `patterns` subdirectories, merge it to `master` and
5554
close the associated issue.
5655

57-
### Publishing a InnerSource pattern on innersourcecommons.org (InnerSourceCommons repository)
56+
### Publishing an InnerSource pattern on innersourcecommons.org (InnerSourceCommons repository)
5857

59-
* for each new pattern which should be published a new issue should be created
60-
* the issue should contain the name of the pattern and a link to it inside of
61-
the InnerSourcePatterns repository
62-
* every publishing process of a pattern idea, donut or draft should start on a
63-
dedicated branch, originating from `master` starting with
64-
`feature/[issue-number]---[title]`
58+
* for each new pattern to be published, a new issue should be created
59+
* the issue should contain the name of the pattern and a link to the accepted
60+
pattern inside of the InnerSourcePatterns repository
61+
* every publishing process of a pattern idea, donut, or draft should start on a
62+
dedicated branch, originating from `master` starting with `pattern/<patternName>`
6563

66-
## License
64+
### Technical steps
65+
66+
If you want to contribute, the workflow is done through branches. You can see the
67+
available branches of this repository at [the branches URL](https://github.com/paypal/InnerSourcePatterns/branches)
68+
or by clicking on the 'branches' button on the main page.
69+
70+
Branches and Pull Requests (PR's) are used to bring discussion/review about a specific inner source pattern.
71+
New patterns should use, as a first approach, the
72+
[pattern template](https://github.com/paypal/InnerSourceCommons/wiki/InnerSource-Patterns-template). There are indeed multiple ways to start a discussion:
73+
* Pull request your branch and the maintainers will receive a notification.
74+
* Ask directly for comments to some of the maintainers. You can mention them
75+
using the symbol '@' prior their nickname.
76+
* Add reviewers to the Pull Request on the website - this sends requests to review your work
77+
78+
Please, when starting a new pattern, be aware that this does not exist. You can
79+
have a look at some of the existing patterns in this repository.
80+
81+
#### How can you create a branch?
82+
83+
In first place you need to create a branch (no need to ask for permission!).
84+
For this, let's clone the repository:
85+
86+
```
87+
$ git clone https://github.com/paypal/InnerSourcePatterns.git
88+
```
89+
90+
Then you should see some message similar to the following one:
91+
92+
```
93+
Cloning into 'InnerSourcePatterns'...
94+
remote: Counting objects: 73, done.
95+
remote: Compressing objects: 100% (37/37), done.
96+
remote: Total 73 (delta 35), reused 73 (delta 35), pack-reused 0
97+
Unpacking objects: 100% (73/73), done.
98+
Checking connectivity... done.
99+
```
100+
101+
This means that you successfully cloned the repository. Then we need to access
102+
the directory and check that everything is as expected.
103+
104+
```
105+
$ cd InnerSourcePatterns/
106+
$ ls
107+
first-test.md README.md second-test.md third-test.md workflow.md
108+
$ git branch
109+
* master
110+
$ git branch -a
111+
* master
112+
remotes/origin/HEAD -> origin/master
113+
remotes/origin/master
114+
remotes/origin/master-public
115+
remotes/origin/pattern/badly-named-piles
116+
remotes/origin/pattern/commonRequirements
117+
remotes/origin/pattern/contained-innersource-enables-collaborative-product-development
118+
```
119+
120+
The command 'git branch' shows you which branch you are currently working within.
121+
And with 'git branch -a' you see additional branches which are local and remote (on the web).
122+
There is extra information using the command '$ man git branch' in linux based systems.
123+
124+
Next, in order to create a new branch as a way to start creating a new pattern,
125+
you need to 'checkout' that branch. As a common nomenclature, all of the
126+
pattern-related branches should start with the keyword 'pattern/'. Thus, a new
127+
branch with a new pattern named as foo should be as follows:
128+
129+
```
130+
$ git checkout -b pattern/foo
131+
```
132+
133+
You are now in the 'pattern/foo' branch. When you create a new branch, the files
134+
in the directory might appear change. Each branch can have slightly different content,
135+
and that is intentional. If you need to go again to the 'master' branch or another
136+
branch, you can easily 'checkout' to those as follows:
137+
138+
```
139+
$ git checkout <branchname>
140+
```
141+
142+
#### Adding a new pattern
143+
144+
Let's imagine we want to work a new pattern related to the activities of the
145+
Ewoks that for some reason gave up hunting. We should choose some initial
146+
name for this pattern file that could be 'ewoks-do-not-hunt.md'.
147+
148+
```
149+
$ git checkout -b pattern/ewoks-do-not-hunt
150+
$ touch ewoks-do-not-hunt.md
151+
```
152+
153+
Once our pattern file is ready to go, we need to add the file to the repo and
154+
commit that change to our new branch.
155+
156+
```
157+
$ git add ewoks-do-not-hunt.md
158+
$ git commit -m "Inner Source Pattern to deal with Ewoks that do not hunt"
159+
```
160+
161+
And we should finally upload that branch and file to the server.
162+
163+
```
164+
$ git push origin pattern/ewoks-do-not-hunt
165+
```
166+
167+
Then, if you feel the pattern is ready to review, you can start a Pull Request (PR) asking
168+
to join your new branch to the master branch. To do this, navigate to the github web repo
169+
and get into your new branch. You should see a 'Create pull request' button while in in your branch.
170+
171+
172+
## Licensing
173+
174+
![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/88x31.png)
175+
176+
InnerSourcePatterns by [InnerSourceCommons.org](http://innersourcecommons.org) is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/) License.
67177

68-
tbd: we have to agree what license we apply to the
69-
[patterns repository][patternsRepo] by default.
70178

71179
[commons]: http://innersourcecommons.org
72-
[patternsRepo]: https://github.com/paypal/InnerSourceCommons-patterns
180+
[patternsRepo]: https://github.com/paypal/InnerSourcePatterns
73181
[commonsRepo]: https://github.com/paypal/InnerSourceCommons
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
• This typeface is Copyright 2009 Hannes von Döhren.
2+
3+
• This typeface may not be redistributed.
4+
5+
• This typeface may not be modified in any way.
6+
7+
• This typeface may not be sold.
8+
9+
• HVD Fonts is not liable for any damage resulting from the use of this typeface.
10+
11+
• This typeface is free for personal and commercial use.
12+
13+
Have Fun!
14+
15+
Contact: hannes@hvdfonts.de
16+
17+
---
18+
19+
https://cooltext.com/Logo-Design-Keen
20+
21+
HVD-Comic-Serif-Pro

assets/img/branchCommitPullReview.png

12.2 KB
Loading

0 commit comments

Comments
 (0)