Skip to content

Commit 068741d

Browse files
authored
Creating contributing.md
1 parent 77908e7 commit 068741d

File tree

1 file changed

+122
-0
lines changed

1 file changed

+122
-0
lines changed

contributing.md

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# CONTRIBUTING
2+
3+
Azure Active Directory SDK projects welcomes new contributors. This document will guide you
4+
through the process.
5+
6+
### CONTRIBUTOR LICENSE AGREEMENT
7+
8+
Please visit [https://cla.microsoft.com/](https://cla.microsoft.com/) and sign the Contributor License
9+
Agreement. You only need to do that once. We can not look at your code until you've submitted this request.
10+
11+
12+
### FORK
13+
14+
Fork this project on GitHub and check out your copy.
15+
16+
Example for Project Foo (which can be any ADAL or MSAL or just any library):
17+
18+
```
19+
$ git clone [email protected]:username/project-foo.git
20+
$ cd project-foo
21+
$ git remote add upstream [email protected]:AzureAD/project-foo.git
22+
```
23+
24+
No need to decide if you want your feature or bug fix to go into the dev branch
25+
or the master branch. **All bug fixes and new features should go into the dev branch.**
26+
27+
The master branch is effectively frozen; patches that change the SDKs
28+
protocols or API surface area or affect the run-time behavior of the SDK will be rejected.
29+
30+
Some of our SDKs have bundled dependencies that are not part of the project proper.
31+
Any changes to files in those directories or its subdirectories should be sent to their respective projects.
32+
Do not send your patch to us, we cannot accept it.
33+
34+
In case of doubt, open an issue in the [issue tracker](issues).
35+
36+
Especially do so if you plan to work on a major change in functionality. Nothing is more
37+
frustrating than seeing your hard work go to waste because your vision
38+
does not align with our goals for the SDK.
39+
40+
41+
### BRANCH
42+
43+
Okay, so you have decided on the proper branch. Create a feature branch
44+
and start hacking:
45+
46+
```
47+
$ git checkout -b my-feature-branch
48+
```
49+
50+
### COMMIT
51+
52+
Make sure git knows your name and email address:
53+
54+
```
55+
$ git config --global user.name "J. Random User"
56+
$ git config --global user.email "[email protected]"
57+
```
58+
59+
Writing good commit logs is important. A commit log should describe what
60+
changed and why. Follow these guidelines when writing one:
61+
62+
1. The first line should be 50 characters or less and contain a short
63+
description of the change prefixed with the name of the changed
64+
subsystem (e.g. "net: add localAddress and localPort to Socket").
65+
2. Keep the second line blank.
66+
3. Wrap all other lines at 72 columns.
67+
68+
A good commit log looks like this:
69+
70+
```
71+
fix: explaining the commit in one line
72+
73+
Body of commit message is a few lines of text, explaining things
74+
in more detail, possibly giving some background about the issue
75+
being fixed, etc etc.
76+
77+
The body of the commit message can be several paragraphs, and
78+
please do proper word-wrap and keep columns shorter than about
79+
72 characters or so. That way `git log` will show things
80+
nicely even when it is indented.
81+
```
82+
83+
The header line should be meaningful; it is what other people see when they
84+
run `git shortlog` or `git log --oneline`.
85+
86+
Check the output of `git log --oneline files_that_you_changed` to find out
87+
what directories your changes touch.
88+
89+
90+
### REBASE
91+
92+
Use `git rebase` (not `git merge`) to sync your work from time to time.
93+
94+
```
95+
$ git fetch upstream
96+
$ git rebase upstream/v0.1 # or upstream/master
97+
```
98+
99+
100+
### TEST
101+
102+
Bug fixes and features should come with tests. Add your tests in the
103+
test directory. This varies by repository but often follows the same convention of /src/test. Look at other tests to see how they should be
104+
structured (license boilerplate, common includes, etc.).
105+
106+
107+
Make sure that all tests pass.
108+
109+
110+
### PUSH
111+
112+
```
113+
$ git push origin my-feature-branch
114+
```
115+
116+
Go to https://github.com/username/microsoft-authentication-library-for-***.git and select your feature branch. Click
117+
the 'Pull Request' button and fill out the form.
118+
119+
Pull requests are usually reviewed within a few days. If there are comments
120+
to address, apply your changes in a separate commit and push that to your
121+
feature branch. Post a comment in the pull request afterwards; GitHub does
122+
not send out notifications when you add commits.

0 commit comments

Comments
 (0)