Skip to content

Commit 7d10eb7

Browse files
authored
1 parent ab591b6 commit 7d10eb7

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

CONTRIBUTING.md

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
## Contributing guide
2+
This document serves as a checklist before contributing to this repository.
3+
It includes links to read up on if topics are unclear to you.
4+
5+
This guide mainly focuses on the proper use of Git.
6+
7+
### 1. Before opening an issue
8+
To report a bug/request please file an issue in the right repository
9+
(example for [Arduino_Core_STM32](https://github.com/stm32duino/Arduino_Core_STM32/issues/new/choose)).
10+
But check the following boxes before posting an issue:
11+
12+
- [ ] `Make sure you are using the latest STM32 core and libraries versions.` See [lastest core here](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest).
13+
- [ ] `Your issue is NOT a question/feedback/suggestions.` This should be discussed on the [stm32duino forum](http://stm32duino.com):
14+
* questions on the [STM32 Core](http://stm32duino.com/viewforum.php?f=48).
15+
* bugs/enhancements on the [STM core: Bugs and enhancements](http://stm32duino.com/viewforum.php?f=49).
16+
- [ ] `Make sure your issue is not already reported/fixed on GitHub or discussed on the forum` See [stm32duino forum](http://stm32duino.com).
17+
- [ ] `Make sure you are working on the right repository.` See the table below.
18+
19+
| Repositories | Projects |
20+
|---|---|
21+
|[STM32 Core](https://github.com/stm32duino/Arduino_Core_STM32) | Arduino core support for STM32 based boards |
22+
|[STM32 Tools](https://github.com/stm32duino/Arduino_Tools) | Contains several tools (upload, scripts,...) |
23+
|[STM32 Examples](https://github.com/stm32duino/STM32Examples) | Arduino library to provide examples related to STM32 |
24+
|[Board Manager Files](https://github.com/stm32duino/BoardManagerFiles) | Storage for Arduino Boards Manager JSON file |
25+
|[CMSIS module](https://github.com/stm32duino/ArduinoModule-CMSIS) | Mainly storage |
26+
|[GNU Arm Embedded Toolchain binaries](https://github.com/stm32duino/arm-none-eabi-gcc) | Mainly storage |
27+
|[STM32 Libraries for Arduino IDE](https://github.com/stm32duino) | Search on the STM32duino GitHub repository |
28+
29+
### 2. Posting the issue
30+
When you have checked the previous boxes. Please consider the following points before posting the issue.
31+
32+
- [ ] `Describe the issue based on the behaviour you were expecting`
33+
- [ ] `Post complete error messages using markdown code fencing:` [Markdown Code Fencing Example](https://guides.github.com/features/mastering-markdown/#examples)
34+
- [ ] `Provide a full set of steps necessary to reproduce the issue`
35+
- [ ] `Demonstration code should be complete, correct and the minimum amount necessary to reproduce the issue`
36+
37+
### 3. Pull Requests
38+
About [Pull Requests](https://help.github.com/articles/about-pull-requests/)
39+
40+
### 4. Commit messages
41+
An easy to read pull request will speed up the merging process. Your commit messages need to be logically separate.
42+
And containing enough information on their own. When this is done consistently your pull request will have an easy
43+
to read log of changes.
44+
45+
Your commits need to be [atomic](https://www.freshconsulting.com/atomic-commits/) which allows the repository to remain
46+
flexible after merging.
47+
48+
If you did not read the following 7 points before or just want to fresh up. Please read up on them on this [website](https://chris.beams.io/posts/git-commit) by Chris Beams.
49+
50+
1. Separate subject from body with a blank line
51+
2. Limit the subject line (first line) to 50 characters
52+
3. Capitalize the subject line
53+
4. Do not end the subject line with a period `(.)`
54+
5. Use the imperative mood in the subject line.
55+
This should be in the written as giving an instruction for example "Fixed save-as bug" (it shows what the PR achieves when merging it)
56+
6. Wrap body at 72 characters
57+
7. Use the body to explain what, why and how
58+
59+
If your pull request fixes, closes or resolves an issue please reference it in the body with the following [syntax](https://help.github.com/articles/closing-issues-via-commit-messages/). Also see the last lines of the following example.
60+
61+
A general example with these 7 guidelines in mind is shown below (from the same website of [Chris Beams](https://chris.beams.io/posts/git-commit)):
62+
```
63+
Summarize changes in around 50 characters or less
64+
65+
More detailed explanatory text, if necessary. Wrap it to about 72
66+
characters or so. In some contexts, the first line is treated as the
67+
subject of the commit and the rest of the text as the body. The
68+
blank line separating the summary from the body is critical (unless
69+
you omit the body entirely); various tools like `log`, `shortlog`
70+
and `rebase` can get confused if you run the two together.
71+
72+
Explain the problem that this commit is solving. Focus on why you
73+
are making this change as opposed to how (the code explains that).
74+
Are there side effects or other unintuitive consequences of this
75+
change? Here's the place to explain them.
76+
77+
Further paragraphs come after blank lines.
78+
79+
- Bullet points are okay, too
80+
81+
- Typically a hyphen or asterisk is used for the bullet, preceded
82+
by a single space, with blank lines in between, but conventions
83+
vary here
84+
85+
If you use an issue tracker, put references to them at the bottom,
86+
like this:
87+
88+
Resolves: #123
89+
See also: #456, #789
90+
```
91+
92+
### 5. Rebasing pull requests
93+
When different people are working on the Arduino project simultaneously, pull requests can go stale quickly. A "stale" pull request is one that is no longer up to date with the latest merges in the project. It needs to be updated before it can be merged.
94+
95+
Most often pull requests become stale when merge conflicts occur. This happens when two pull requests both modify similar lines in the same file and one gets merged, the unmerged request will now have a merge conflict and needs updating.
96+
97+
When your pull request is stale, you will need to rebase your branch on the current master branch before you can merge it without conflicts.
98+
99+
More information about rebasing can be found at the repository of [edX](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request).
100+
101+
### 6. Merged!
102+
When your pull request is merged please update the documentation if the changes require it
103+
[Wiki](https://github.com/stm32duino/wiki/wiki)

0 commit comments

Comments
 (0)