Skip to content

Commit e35b5ce

Browse files
committed
Updated contributing.md
[skip ci]
1 parent dbdd72b commit e35b5ce

2 files changed

Lines changed: 145 additions & 98 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 73 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,99 @@
1-
Contributing to Project Magrathea
1+
Contribute to PowerShell
22
=================================
33

4-
Rules
5-
-----
6-
7-
**Do not commit code changes to the master branch!**
8-
9-
Don't forget to commit early and often!
10-
11-
All pull requests **must** pass both CI systems before they will be approved.
12-
13-
Write *good* commit messages. Follow Tim Pope's [guidelines][]:
14-
15-
* The first line *must* be a short, capitalized summary
16-
* The second line *must* be blank
17-
* The rest should be a wrapped, detailed explanation of the what and why
18-
* The tone should be imperative
19-
20-
[guidelines]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
21-
22-
New to Git?
23-
-----------
4+
We love to have contributions from you! There are several ways to contribute such as filing issues, joining in design conversations,
5+
documentation, contributing to code. To keep this process smooth, there are a few guidelines mentioned below for contributors to follow.
6+
PowerShell team will be happy to explain the guidelines via Github Issue if you have questions.
247

8+
##New to Git?##
9+
- Make sure you have a [GitHub account](https://github.com/signup/free)
2510
- [Git Basics](../docs/git/basics.md): install and getting started.
11+
- [Commit process](../docs/git/committing.md): sstep-by-step instructions how to commit your changes
2612
- [Git for sd users](../docs/git/source-depot.md): a handy reference
27-
document for people familiar with `sd`.
28-
- [Commit process](../docs/git/committing.md): step-by-step commit guide
29-
with all gory details.
30-
31-
Authentication
32-
--------------
13+
document for people familiar with `sd`
3314

34-
If you do not have a preferred method of authentication, enable the storage
35-
credential helper, which will cache your credentials in plaintext on your
36-
system, so use a [token][].
37-
38-
```sh
39-
git config --global credential.helper store
40-
```
15+
16+
##Quick Start Check-list##
4117

42-
Alternatively, on Windows, you can try the
43-
[Git Credential Manager for Windows][manager].
18+
- Read [the Community Governance] (community/governance.md)
19+
- Make sure you have signed [PowerShell Contribution License Agreement (CLA)]("Contributor License Agreement") before pull request
20+
- Get familar with the [PowerShell repository structure](dev-process/build/branch-structure.md)
21+
- Setup your [development environment] (dev-process/setup/setup-dev-environment.md)
22+
- Build the [PowerShell repository] (../readme.md)
23+
- [Try it out with the binaries you just built] (try-out.md)
4424

45-
[token]: https://help.github.com/articles/creating-an-access-token-for-command-line-use/
46-
[manager]: https://github.com/Microsoft/Git-Credential-Manager-for-Windows
4725

48-
Microsoft employees
49-
-------------------
26+
##Contributing to Issues##
5027

51-
Microsoft employees should follow Microsoft open source [guidelinces][MS-OSS-Hub].
28+
- Review the [Github Issue Management process](dev-process/issue-management-process.md). It covers the definition of Label, Assignee
29+
and the guidance like verifying and closing issues
30+
- Check if the issue you are going to file already exists in [GitHub Issue query](https://github.com/PowerShell/PowerShell/issues)
31+
- Submit an issue, assuming it does not exist yet, via [GitHub Issue track](https://github.com/PowerShell/PowerShell/issues) by following the [Issue template] (issue-template.md).
5232

53-
Particularly:
33+
##Contributing to Documentation##
34+
- TODO: Don will fill in the details
5435

55-
* [Join][MS-OSS-Hub] Microsoft GitHub organization.
56-
* Use your `alias@microsoft.com` for commit messages email.
57-
* Enable [2 factor authentication][].
36+
##Contributing to Code##
5837

59-
[MS-OSS-Hub]: https://opensourcehub.microsoft.com/articles/how-to-join-microsoft-github-org-self-service
60-
[2 factor authentication]: https://github.com/blog/1614-two-factor-authentication
38+
- [Pick something to work on] (https://github.com/PowerShell/PowerShell/issues)
39+
- If what you want to work on does not exist in the query, create an issue for your work
40+
- Get agreement from the PowerShell team and the community regarding your proposed change via the [Issue Triage Process](dev-process/issue-management-process.md).
41+
- If you will be adding a new cmdlet or other design changes, follow [Making Design Changes guidelines]("Making Design Changes")
42+
- For breaking changes, see [Make Breaking Changes guidelines]("Making Breaking Changes")
43+
- The issue filer and the implementer don't have to be the same person. So clearly state when you create an issue that you will be the implementer, so the issue can be assigned to you
44+
- Create a [personal fork of the repository](https://help.github.com/articles/fork-a-repo/) or a [branch](https://guides.github.com/activities/hello-world/) to start your work
45+
- Follow the [coding guidelines] (coding-guidelines/coding-guidelines.md)
46+
- Ensure pass the [checkin tests] (testing-requirements/test-guidelines.md) for code changes
47+
- Create a [GitHub pull request (PR)] (https://guides.github.com/activities/hello-world/)) against the upstream repository
48+
- Perform a [code review] (dev-precess/code-review-guidelines.md) with the PowerShell Committee (TODO) on the pull request.
6149

62-
[Branches](../docs/workflow/branches.md)
63-
-------------------------------------
6450

65-
* Checkout a new local branch for every change you want to make (bugfix, feature).
66-
* Use `alias/feature-name` pattern.
67-
* Use lowercase-with-dashes for naming.
68-
* Use same branch name in superproject and all [submodules][].
51+
##Making Breaking Changes##
6952

70-
[submodules]: https://www.git-scm.com/book/en/v2/Git-Tools-Submodules
53+
When you make code changes, please pay attention to these that can affect the [Public Contract](dev-process/breaking-change-contract.md),
54+
for example, PowerShell parameter, API or protocols changes. Before starting making changes to the code, first review the [Breaking Changes guidelines] (dev-process/breaking-change-contract.md)
55+
and follow the guidelines to keep PowerShell backward compatible.
7156

72-
Permissions
73-
-----------
57+
##Making Design Changes##
58+
To add new features such as cmdlets or making design changes, please follow the [PowerShell Request for Comments (RFC)](https://github.com/PowerShell/PowerShell-RFC) process.
7459

75-
If you have difficulty in pushing your changes, there is a high probability that
76-
you actually don't have permissions.
77-
78-
Be sure that you have write access to corresponding repo (remember that
79-
submodules have their own privilege).
80-
81-
Your should push to this repository instead of a fork so that the CI system can
82-
provide credentials to your pull request. If you make a pull request from a
83-
fork, the CI *will* fail.
84-
85-
Recommended Git configurations
86-
------------------------------
87-
88-
We highly recommend these configurations to help deal with whitespace,
89-
rebasing, and general use of Git.
90-
91-
> Auto-corrects your command when it's sure (`stats` to `status`)
92-
```sh
93-
git config --global help.autoCorrect -1
60+
##Common Engineering Practices##
61+
Other than the guidelines ([coding](coding-guidelines/coding-guidelines.md), [RFC process](https://github.com/PowerShell/PowerShell-RFC) for design, [documetnation]() and [testing](testing-requirements/test-guidelines.md)) discussed above, following are common engineering practices we would like everyone to follow:
62+
- Do not commit code changes to the master branch! You should [fork or checkout a branch]("Contributing to Code")
63+
- Format commit messages as follows based on [the Tim Pope's guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html):
9464
```
65+
Summarize change in 50 characters or less
9566
96-
> Refuses to merge when pulling, and only pushes to branch with same name.
97-
```sh
98-
git config --global pull.ff only
99-
git config --global push.default current
100-
```
67+
Provide more detail after the first line. Leave one blank line below the
68+
summary and wrap all lines at 72 characters or less.
10169
102-
> Shows shorter commit hashes and always shows reference names in the log.
103-
```sh
104-
git config --global log.abbrevCommit true
105-
git config --global log.decorate short
106-
```
70+
If the change fixes an issue, leave another blank line after the final
71+
paragraph and indicate which issue is fixed in the specific format
72+
below.
10773
108-
> Ignores whitespace changes and uses more information when merging.
109-
```sh
110-
git config --global apply.ignoreWhitespace change
111-
git config --global rerere.enabled true
112-
git config --global rerere.autoUpdate true
113-
git config --global am.threeWay true
74+
Fix #42
11475
```
76+
- Don’t commit code that you didn't write. If you find code that you think is a good fit to add to PowerShell, file an issue and start a discussion before proceeding.
77+
- Create and/or update tests when making code changes
78+
- Run tests and ensure they are passing before pull request
79+
- All pull requests **must** pass CI systems before they can be approved
80+
- Avoid making a big pull requests. Instead, file an issue and start a discussion with the community before you invest a large amount of time.
81+
- Blog and tweet about your contributions, frequently!
82+
83+
##File Headers##
84+
The following file header is the used for PowerShell. Please use it for new files. For more information, see [coding guidelines](coding-guidelines/coding-guidelines.md).
85+
```C#
86+
// … TODO TODO
87+
// Licensed to the PowerShell …. under one or more agreements.
88+
// See the LICENSE file in the project root for more information.
11589
116-
[Mapping](../docs/workflow/mapping.md)
117-
-----------------------------------
118-
119-
Learn about new files locations in PowerShell/PowerShell.
90+
```
91+
##Licensing & Copyright##
92+
You can find [here]() for the PowerShell sources license and copyright information.
12093

121-
[Resources](../docs/workflow/resources.md)
122-
---------------------------------------
94+
##Contributor License Agreement##
95+
You must sign a PowerShell Contribution License Agreement (CLA) before your Pull Request will be merged.
96+
This a one-time requirement for the PowerShell project. Signing the CLA process is simple and can be done in less than a minute.
97+
You can read more about [Contribution License Agreements (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) on wikipedia.
12398

124-
Learn how to work with string resources in `.resx` files.
99+
You don't have to do this up-front. You can simply clone, fork, and submit your pull-request as usual. When your pull-request is created, it is classified by a CLA bot. If the change is trivial (e.g. you just fixed a typo), then the PR is labelled with cla-not-required. Otherwise it's classified as cla-required. Once you signed a CLA, the current and all future pull-requests will be labelled as cla-signed.

docs/git/basics.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,75 @@ Then switch to your branch and do rebase
8686
```
8787
git rebase master
8888
```
89+
90+
[Branches](../docs/workflow/branches.md)
91+
-------------------------------------
92+
93+
* Checkout a new local branch for every change you want to make (bugfix, feature).
94+
* Use `alias/feature-name` pattern.
95+
* Use lowercase-with-dashes for naming.
96+
* Use same branch name in superproject and all [submodules][].
97+
98+
[submodules]: https://www.git-scm.com/book/en/v2/Git-Tools-Submodules
99+
100+
Authentication
101+
--------------
102+
103+
If you do not have a preferred method of authentication, enable the storage
104+
credential helper, which will cache your credentials in plaintext on your
105+
system, so use a [token][].
106+
107+
```sh
108+
git config --global credential.helper store
109+
```
110+
111+
Alternatively, on Windows, you can try the
112+
[Git Credential Manager for Windows][manager].
113+
114+
[token]: https://help.github.com/articles/creating-an-access-token-for-command-line-use/
115+
[manager]: https://github.com/Microsoft/Git-Credential-Manager-for-Windows
116+
117+
118+
Permissions
119+
-----------
120+
121+
If you have difficulty in pushing your changes, there is a high probability that
122+
you actually don't have permissions.
123+
124+
Be sure that you have write access to corresponding repo (remember that
125+
submodules have their own privilege).
126+
127+
Your should push to this repository instead of a fork so that the CI system can
128+
provide credentials to your pull request. If you make a pull request from a
129+
fork, the CI *will* fail.
130+
131+
Recommended Git configurations
132+
------------------------------
133+
134+
We highly recommend these configurations to help deal with whitespace,
135+
rebasing, and general use of Git.
136+
137+
> Auto-corrects your command when it's sure (`stats` to `status`)
138+
```sh
139+
git config --global help.autoCorrect -1
140+
```
141+
142+
> Refuses to merge when pulling, and only pushes to branch with same name.
143+
```sh
144+
git config --global pull.ff only
145+
git config --global push.default current
146+
```
147+
148+
> Shows shorter commit hashes and always shows reference names in the log.
149+
```sh
150+
git config --global log.abbrevCommit true
151+
git config --global log.decorate short
152+
```
153+
154+
> Ignores whitespace changes and uses more information when merging.
155+
```sh
156+
git config --global apply.ignoreWhitespace change
157+
git config --global rerere.enabled true
158+
git config --global rerere.autoUpdate true
159+
git config --global am.threeWay true
160+
```

0 commit comments

Comments
 (0)