Skip to content

Commit 7c1ca04

Browse files
committed
Add a project contributor guide
Documentation of how to contribute to the project gives everyone the opportunity to participate, while also reducing the maintenance effort and increasing the quality of contributions. This guide documents the various ways of contributing to the project.
1 parent 0ba88d5 commit 7c1ca04

File tree

6 files changed

+268
-1
lines changed

6 files changed

+268
-1
lines changed

.github/ISSUE_TEMPLATE/config.yml

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ contact_links:
88
- name: Support request
99
url: https://forum.arduino.cc/
1010
about: We can help you out on the Arduino Forum!
11+
- name: Issue report guide
12+
url: https://github.com/arduino/arduino-ide/blob/main/docs/issues.md#issue-report-guide
13+
about: Learn about submitting issue reports to this repository.
14+
- name: Contributor guide
15+
url: https://github.com/arduino/arduino-ide/blob/main/docs/CONTRIBUTING.md#contributor-guide
16+
about: Learn about contributing to this project.
1117
- name: Discuss development work on the project
1218
url: https://groups.google.com/a/arduino.cc/g/developers
1319
about: Arduino Developers Mailing List

docs/CONTRIBUTING.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!-- Source: https://github.com/arduino/tooling-project-assets/blob/main/documentation-templates/contributor-guide/general/CONTRIBUTING.md -->
2+
3+
# Contributor Guide
4+
5+
Thanks for your interest in contributing to this project!
6+
7+
There are several ways you can get involved:
8+
9+
| Type of contribution | Contribution method |
10+
| ----------------------------------------- | -------------------------------------------------------------------------------- |
11+
| - Support<br/>- Question<br/>- Discussion | Post on the [**Arduino Forum**][forum] |
12+
| - Bug report<br/>- Feature request | Issue report (see the guide [**here**][issues]) |
13+
| Testing | Beta testing, PR review (see the guide [**here**][beta-testing]) |
14+
| Translation | [Transifex project][translate] |
15+
| - Bug fix<br/>- Enhancement | Pull request (see the guide [**here**][prs]) |
16+
| Monetary | - [Donate][donate]<br/>- [Sponsor][sponsor]<br/>- [Buy official products][store] |
17+
18+
[forum]: https://forum.arduino.cc
19+
[issues]: contributor-guide/issues.md#issue-report-guide
20+
[beta-testing]: contributor-guide/beta-testing.md#beta-testing-guide
21+
[translate]: https://www.transifex.com/arduino-1/ide2/dashboard/
22+
[prs]: contributor-guide/pull-requests.md#pull-request-guide
23+
[donate]: https://www.arduino.cc/en/donate/
24+
[sponsor]: https://github.com/sponsors/arduino
25+
[store]: https://store.arduino.cc
26+
27+
## Resources
28+
29+
- [**Development Guide**](development.md#development-guide)
39.1 KB
Loading

docs/contributor-guide/beta-testing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Source: https://github.com/arduino/tooling-project-assets/blob/main/documentation-templates/contributor-guide/application/beta-testing.md -->
1+
<!-- Source: https://github.com/arduino/tooling-project-assets/blob/main/documentation-templates/contributor-guide/application/contributor-guide/beta-testing.md -->
22

33
# Beta Testing Guide
44

docs/contributor-guide/issues.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!-- Source: https://github.com/arduino/tooling-project-assets/blob/main/documentation-templates/contributor-guide/general/contributor-guide/issues.md -->
2+
3+
# Issue Report Guide
4+
5+
---
6+
7+
❗ Do you need help or have a question about using this project? Support requests should be made to the [Arduino Forum](https://forum.arduino.cc).
8+
9+
---
10+
11+
High quality bug reports and feature requests are valuable contributions to this project. These can be made by submitting an issue report to the project's GitHub repository:
12+
13+
https://github.com/arduino/arduino-ide/issues/new/choose
14+
15+
## Before Reporting an Issue
16+
17+
- Give the latest development version a test drive to see if your issue was already resolved:<br />
18+
https://www.arduino.cc/en/software#nightly-builds
19+
- Search [existing pull requests and issues](https://github.com/arduino/arduino-ide/issues?q=) to see if it was already reported.<br />
20+
If you have additional information to provide about an existing issue, please comment there instead of creating a duplicate. You can use [GitHub's "Reactions" feature](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) if you only want to express support 👍.
21+
22+
## Qualities of an Excellent Report
23+
24+
- Concise and descriptive issue title.<br />
25+
Vague titles make it difficult to decipher the purpose of the issue when looking through the list of reports, which might result in your issue not being given proper attention.
26+
- Describe the issue and what behavior you were expecting.<br />
27+
Include the full and exact text of any relevant error or warning messages you might have encountered.
28+
- Provide a full set of steps necessary to reproduce the issue.<br />
29+
Demonstration code or commands should be complete and simplified to the minimum necessary to reproduce the issue.
30+
- Be responsive.<br />
31+
We may need you to provide additional information in order to investigate and resolve the issue.<br />
32+
Make sure your GitHub account is configured so that you will receive notifications of responses to your issue report.
33+
- If you find a solution to your problem, please comment on your issue report with an explanation of how you were able to fix it, then close the issue.
+199
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
<!-- Source: https://github.com/arduino/tooling-project-assets/blob/main/documentation-templates/contributor-guide/general/contributor-guide/pull-requests.md -->
2+
3+
# Pull Request Guide
4+
5+
A [**pull request**](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) (PR) is the mechanism used to propose changes to the content of this project's repository.
6+
7+
If you are looking for ideas of what to work on, check [the list of open issue reports](https://github.com/arduino/arduino-ide/issues). Pull requests addressing any of those bug reports and feature requests are welcome.
8+
9+
## Contribution Workflow
10+
11+
Each contribution travels through a formal process which allows it to be efficiently incorporated into the project.
12+
13+
### 1. Plan
14+
15+
#### Research
16+
17+
Start by searching the repository for existing pull requests and issues related to your planned contribution so you can see any related conversations and proposals and avoid duplicate effort:
18+
19+
https://github.com/arduino/arduino-ide/issues?q=
20+
21+
#### Discussion
22+
23+
It can sometimes be useful to get feedback from others during the planning process. There are a couple good options for discussing planned development work:
24+
25+
- Talk with the user community on the [Arduino Forum](https://forum.arduino.cc/).
26+
- Talk with Arduino developers on the [Arduino Developers Mailing List](https://groups.google.com/a/arduino.cc/g/developers).
27+
28+
### 2. Fork
29+
30+
Forking a GitHub repository creates a copy of it under your account. You will stage contributions in your fork of this project.
31+
32+
[More information about forking repositories](https://docs.github.com/get-started/quickstart/fork-a-repo)
33+
34+
#### Enabling CI in Your Fork
35+
36+
The repository is configured to run automated [continuous integration](https://wikipedia.org/wiki/Continuous_integration) (CI) checks and tests. It's a good idea to enable CI in your fork so you can make sure your work will pass the checks before you submit a pull request:
37+
38+
1. Open the homepage of your fork in the browser.
39+
1. Click the "**Actions**" tab.
40+
1. Click the <kbd>**I understand my workflows, go ahead and enable them**</kbd> button.
41+
1. Some of the workflows will now need to be activated individually. Perform the following steps for each of the useful workflows listed on the left side of the page that have a "**!**" icon:
42+
1. Click on the workflow name.
43+
1. Click the <kbd>**Enable workflow**</kbd> button.
44+
45+
### 3. Clone
46+
47+
Cloning a repository creates a copy of it on your computer.
48+
49+
It is possible to make simple changes to your repository using the GitHub web interface without cloning the repository. However, the GitHub web interface is quite limiting so you will likely find the need to work with a clone (using **Git** directly or your choice of [Git client software](https://git-scm.com/downloads/guis)) for any significant development work.
50+
51+
[More information about cloning repositories](https://git-scm.com/docs/git-clone)
52+
53+
### 4. Branch
54+
55+
Create a branch in your fork to contain the changes for your contribution. You must make a separate branch in your fork for each pull request you submit.
56+
57+
[More information about branches](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches)
58+
59+
### 5. Make a change
60+
61+
Some things to keep in mind:
62+
63+
- Make sure your change complies with the project's established style conventions.
64+
- Remember to also update the documentation content in the repository if required by your changes.
65+
- If the project contains a test suite, update or add tests according to your change as appropriate.
66+
67+
See [the development guide](../development.md#development-guide) for more information.
68+
69+
### 6. Test
70+
71+
Test your change carefully to make sure it works correctly and did not break other components of the project.
72+
73+
As a supplement for general testing, the project is set up with automated checks and tests to facilitate development.
74+
75+
See [the development guide](../development.md#development-guide) for instructions.
76+
77+
### 7. Commit
78+
79+
Once the work on your change is complete, add it to the revision history of the Git repository by making a commit.
80+
81+
Make sure to follow the [Commit Guidelines](#commit-guidelines).
82+
83+
[More information about commits](https://git-scm.com/docs/git-commit)
84+
85+
### 8. Push
86+
87+
If you're working from a [clone](#3-clone), you will need to push your commit to your fork on GitHub.
88+
89+
[More information about pushing commits](https://git-scm.com/docs/git-push)
90+
91+
#### Checking CI Results
92+
93+
If you have [enabled CI in your repository](#enabling-ci-in-your-fork), GitHub will run the relevant checks automatically every time you push a commit to your fork.
94+
95+
You can see the results of these checks by doing either of the following:
96+
97+
- Clicking the status icon (✔️ or ❌) shown to the right of a commit.
98+
- Opening the repository's "**Actions**" tab.
99+
100+
### 9. Pull request
101+
102+
A pull request (PR) is a proposal to make a change in a repository. The repository maintainer is able to accept the changes you propose in a pull request by simply clicking a button.
103+
104+
[More information about pull requests](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)
105+
106+
#### Scope
107+
108+
Each pull request should address a single bug fix or enhancement. If you have multiple unrelated fixes or enhancements to contribute, submit them as separate pull requests.
109+
110+
#### Description
111+
112+
Pull request title and description should follow [the same guidelines as commit messages](#commit-message).
113+
114+
If your pull request fixes an issue in the issue tracker, use [a closing keyword](https://docs.github.com/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) in the body to indicate this.
115+
116+
In some cases, it might make sense to request feedback on a proposal before it is ready to be merged. You can indicate this by starting the pull request title with **[WIP]** (work in progress). Once the pull request is ready to be merged, edit the title and remove the "[WIP]".
117+
118+
#### Cross-repository Contributions
119+
120+
Some proposals may require changes to multiple repositories. Pull requests should be submitted in parallel to each repository.
121+
122+
Clearly note any dependencies on other PRs in the description so that these can be evaluated by the reviewer and the merges coordinated.
123+
124+
---
125+
126+
Please check whether any changes are required to the related documentation content hosted in the separate dedicated repositories:
127+
128+
- [**arduino/docs-content**](https://github.com/arduino/docs-content)
129+
- [**arduino/help-center-content**](https://github.com/arduino/help-center-content)
130+
131+
### 10. Resolve CI failures
132+
133+
Relevant checks will run automatically once you have submitted the pull request. Once these checks are finished, you can see a summary of the results near the bottom of the pull request page:
134+
135+
![checks](assets/checks.png)
136+
137+
Failed checks will be indicated with an ❌. If any checks failed, please fix whatever caused it to fail. Click the "**Details**" link to the right of the check name to open the logs, which provide details about the failure.
138+
139+
---
140+
141+
**** In some rare cases, a CI failure may be unrelated to the changes made in your pull request. So if the information in the logs doesn't seem relevant, please comment on the pull request to ask a maintainer to take a look.
142+
143+
---
144+
145+
When you push to the branch of your fork the pull request was submitted from, the commit is automatically added to the pull request. Don't create a new pull request to fix problems; update the existing pull request.
146+
147+
### 11. Resolve changes requested from reviews
148+
149+
Interested parties may review your pull request and suggest improvements.
150+
151+
To act on general review suggestions, you can add commits to the branch you submitted the pull request from, which will automatically be added to the pull request. Don't create a new pull request to act on review suggestions; update the existing pull request.
152+
153+
Reviewers may suggest specific changes, which can be applied by [clicking the <kbd>**Commit suggestion**</kbd> button](https://docs.github.com/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request#applying-suggested-changes).
154+
155+
[More information about pull request reviews](https://docs.github.com/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews)
156+
157+
### 12. Merge
158+
159+
One of the repository maintainers can now choose to accept your proposed change. Once the pull request is [merged](https://docs.github.com/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request), you can delete the branch you created in your fork for the pull request and delete the fork as well if you like.
160+
161+
Thanks so much for your contribution!
162+
163+
---
164+
165+
It is possible that the maintainers may decide a pull request doesn't align with Arduino's goals for the project and close it rather than merging. A record of the proposed changes will always be available on GitHub for future reference. If you think your modifications will be of use to others, you are welcome to maintain your own fork of the repository.
166+
167+
---
168+
169+
## Commit Guidelines
170+
171+
The commit history of a repository is an important resource for developers. Repositories may accumulate thousands of commits over the course of decades. Each individual commit contributes either to the commit history being pleasant and efficient to work with, or to it being a confusing mess. For this reason, it's essential for contributors to create clean, high quality commits.
172+
173+
### Scope
174+
175+
Commits must be "atomic". This means that the commit completely accomplishes a single task. Each commit should result in fully functional code. Multiple tasks should not be combined in a single commit, but a single task should not be split over multiple commits (e.g., one commit per file modified is not a good practice).
176+
177+
[More information about atomic commits](https://www.freshconsulting.com/insights/blog/atomic-commits/)
178+
179+
### Commit Message
180+
181+
The commit message documents what the change was and why it was done. A little effort now writing a good commit message can save future developers from wasted time and frustration trying to understand the purpose of a poorly documented commit.
182+
183+
#### Commit Message Title
184+
185+
- Use the [imperative mood](https://cbea.ms/git-commit/#imperative) in the title.<br />
186+
For example:
187+
> Use LED_BUILTIN macro in LED pin definition
188+
- Capitalize the title.
189+
- Do not end the title with punctuation.
190+
- Do not use GitHub's default commit titles (e.g., "Update examples/Foo/Foo.ino").
191+
192+
#### Commit Message Body
193+
194+
- Separate title from the body with a blank line. If you're committing via GitHub or [GitHub Desktop](https://desktop.github.com/) this will be done automatically.
195+
- Wrap body at 120 characters.
196+
- Completely explain the purpose of the commit.<br />
197+
Include a rationale for the change, any caveats, side-effects, etc.
198+
199+
[More information on commit messages](https://cbea.ms/git-commit/)

0 commit comments

Comments
 (0)