Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 7769f10

Browse files
authored
Merge pull request #2 from OsmosysSoftware/REST-244
REST-244: add contributing.md file
2 parents 444df4f + 8aebcee commit 7769f10

File tree

1 file changed

+177
-0
lines changed

1 file changed

+177
-0
lines changed

CONTRIBUTING.md

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# Contributing to DotnetFoundation
2+
3+
We would love for you to contribute to DotnetFoundation and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow:
4+
5+
## Got a Question or Problem?
6+
7+
Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [Stack Overflow][stackoverflow] where the questions should be tagged with tag dotnet-foundation.
8+
9+
Stack Overflow is a much better place to ask questions since:
10+
11+
Questions and answers stay available for public viewing so your question / answer might help someone else
12+
Stack Overflow's voting system assures that the best answers are prominently visible.
13+
To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow.
14+
15+
## Found a Bug?
16+
17+
If you find a bug in the source code, you can help us by submitting an issue to our GitHub Repository. Even better, you can submit a Pull Request with a fix.
18+
19+
## Missing a Feature?
20+
21+
You can request a new feature by submitting an issue to our GitHub Repository. If you would like to implement a new feature, please submit an issue with a proposal for your work first, to be sure that we can use it. Please consider what kind of change it is:
22+
23+
- For a Major Feature, first open an issue and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project. For your issue name, please prefix your proposal with `[discussion]`, for example "[discussion]: your feature idea".
24+
- Small Features can be crafted and directly [submitted as a Pull Request](#submit-pr).
25+
26+
## <a name="submit"></a> Submission Guidelines
27+
28+
### <a name="submit-issue"></a> Submitting an Issue
29+
30+
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
31+
32+
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using a repository or Gist. Having a live, reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like:
33+
34+
- version of Dotnet-Foundation used
35+
- 3rd-party libraries and their versions
36+
- and most importantly - a use-case that fails
37+
38+
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
39+
40+
You can file new issues by filling out our new issue form.
41+
42+
### Submitting a Pull Request (PR)
43+
44+
Before you submit your Pull Request (PR) consider the following guidelines:
45+
1. Search GitHub Pull Requests for an open or closed PR that relates to your submission. You don't want to duplicate effort.
46+
2. Fork this repository.
47+
3. Make your changes in a new git branch:
48+
```shell
49+
git checkout -b my-fix-branch main
50+
```
51+
4. Create your patch, including appropriate test cases.
52+
5. Follow our [Coding Rules](#rules).
53+
6. Run the application on IIS express server to test if application is functioning with new changes.
54+
7. Commit your changes using a descriptive commit message that follows our commit message conventions. Adherence to these conventions is necessary because release notes are automatically generated from these messages.
55+
```shell
56+
git commit -a
57+
```
58+
Note: the optional commit -a command line option will automatically "add" and "rm" edited files.
59+
8. Push your branch to GitHub:
60+
```shell
61+
git push origin my-fix-branch
62+
```
63+
9. In GitHub, send a pull request to `dotnet-foundation:main`.
64+
- If we suggest changes then:
65+
- Make the required updates.
66+
- Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
67+
```shell
68+
git rebase main -i
69+
git push -f
70+
```
71+
72+
That's it! Thank you for your contribution!
73+
74+
After your pull request is merged
75+
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
76+
77+
- Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
78+
```shell
79+
git push origin --delete my-fix-branch
80+
```
81+
- Check out the main branch:
82+
```shell
83+
git checkout main -f
84+
```
85+
- Delete the local branch:
86+
```shell
87+
git branch -D my-fix-branch
88+
```
89+
- Update your main with the latest upstream version:
90+
```shell
91+
git pull --ff upstream main
92+
```
93+
94+
## <a name="rules"></a> Coding Rules
95+
96+
To ensure consistency throughout the source code, keep these rules in mind as you are working:
97+
98+
- All features or bug fixes **must be tested** by one or more specs (unit-tests).
99+
- We follow [Airbnb JavaScript Style Guide][js-style-guide], but wrap all code at
100+
**100 characters**. An automated formatter is available (`npm run format`).
101+
102+
## <a name="commit"></a> Commit Message Guidelines
103+
104+
We have very precise rules over how our git commit messages can be formatted. This leads to **more
105+
readable messages** that are easy to follow when looking through the **project history**. But also,
106+
we use the git commit messages to **generate the dotnet-foundation change log**.
107+
108+
### Commit Message Format
109+
110+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
111+
format that includes a **type**, a **scope** and a **subject**:
112+
113+
```
114+
<type>: <subject>
115+
<BLANK LINE>
116+
<body>
117+
<BLANK LINE>
118+
<footer>
119+
```
120+
121+
The **header** is mandatory.
122+
123+
Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier
124+
to read on GitHub as well as in various git tools.
125+
126+
Footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
127+
128+
Samples: (even more [samples][commits_samples])
129+
130+
```
131+
docs: update change log to beta.5
132+
fix: need to depend on latest rxjs and zone.js
133+
```
134+
135+
### Revert
136+
137+
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
138+
139+
### Type
140+
141+
Must be one of the following:
142+
143+
- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
144+
- **chore**: Updating tasks etc; no production code change
145+
- **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
146+
- **docs**: Documentation only changes
147+
- **feat**: A new feature
148+
- **fix**: A bug fix
149+
- **perf**: A code change that improves performance
150+
- **refactor**: A code change that neither fixes a bug nor adds a feature
151+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
152+
- **test**: Adding missing tests or correcting existing tests
153+
- **sample**: A change to the samples
154+
155+
### Subject
156+
157+
The subject contains succinct description of the change:
158+
159+
- use the imperative, present tense: "change" not "changed" nor "changes"
160+
- don't capitalize first letter
161+
- no dot (.) at the end
162+
163+
### Body
164+
165+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
166+
The body should include the motivation for the change and contrast this with previous behavior.
167+
168+
### Footer
169+
170+
The footer should contain any information about **Breaking Changes** and is also the place to
171+
reference GitHub issues that this commit **Closes**.
172+
173+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
174+
175+
[stackoverflow]: https://stackoverflow.com/questions/tagged/dotnet-foundation
176+
[commit-message-format]: https://osmosysasia-my.sharepoint.com/:w:/r/personal/sameer_shaik_osmosys_co/_layouts/15/Doc.aspx?sourcedoc=%7B4DD406FF-845F-41FF-AD51-8109D8F4C96E%7D&file=GIT_Conventions.docx&action=default&mobileredirect=true
177+
[github]: https://github.com/OsmosysSoftware/dotnet-foundation

0 commit comments

Comments
 (0)