Skip to content

Commit a8baf23

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 maintenance effort and increasing quality of contributions. This guide documents the various ways of contributing to the project. It takes advantage of GitHub's "contributing guidelines" feature to increase the visibility of the information to prospective contributors. The promoted "CONTRIBUTING.md" file is used as an entry point to the guide, with links from there leading to dedicated guides for each specific type of contribution. In this way, the contributor is only presented with relevant information, improving the approachability and readability of the content.
1 parent f3a7b14 commit a8baf23

File tree

7 files changed

+270
-10
lines changed

7 files changed

+270
-10
lines changed

README.md

+4-10
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,8 @@ This repository is used for collaborative development of the assets of the [Ardu
1515

1616
The source content and metadata of the assets is stored in the files in this repository. There is additional documentation about the assets in their individual folders.
1717

18-
The development is done via a formal process that allows all interested parties the opportunity to participate in an efficient manner:
18+
## How to Contribute
1919

20-
1. Create [a branch](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-branches) to contain your proposed changes.
21-
1. Make your proposed changes to the appropriate file.
22-
1. [Commit](https://git-scm.com/docs/git-commit) the change to the repository.
23-
1. Submit a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) (PR) from your branch to the `main` branch.
24-
1. Some automated checks will now run on the pull request to make sure there are not any typos, broken links, or style issues. If the check failure doesn't seem correct, feel free to request `@per1234` to investigate.
25-
1. All interested parties will now have the opportunity to [review the pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-request-reviews). They can request changes, make general comments and discussion, or approve the pull request.
26-
1. If any changes have been requested by reviewers, the pull request author can make changes to the pull request's branch and commit them. These commits will automatically be added to the pull request.
27-
1. Once the pull request has been approved, it is [merged](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/merging-a-pull-request) into the `main` branch.
28-
1. The content is published to the Arduino Forum.
20+
Contributions are welcome!
21+
22+
Please see the [**Contributor Guide**](docs/CONTRIBUTING.md) for information.

docs/CONTRIBUTING.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
| - Defect report<br/>- Enhancement proposal | Issue report (see the guide [**here**][issues]) |
13+
| - Correction<br/>- Enhancement | Pull request (see the guide [**here**][prs]) |
14+
| Monetary | - [Donate][donate]<br/>- [Sponsor][sponsor]<br/>- [Buy official products][store] |
15+
16+
[forum]: https://forum.arduino.cc
17+
[issues]: contributor-guide/issues.md#issue-report-guide
18+
[prs]: contributor-guide/pull-requests.md#pull-request-guide
19+
[donate]: https://www.arduino.cc/en/donate/
20+
[sponsor]: https://github.com/sponsors/arduino
21+
[store]: https://store.arduino.cc
22+
23+
## Resources
24+
25+
- [**Development Guide**](development.md#development-guide)

docs/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Project Documentation
2+
3+
This folder contains the documentation for contributing to this project.
4+
5+
See the [**Contributor Guide**](CONTRIBUTING.md).
39.1 KB
Loading

docs/contributor-guide/issues.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 defect reports and enhancement proposals 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/per1234/forum-assets/issues/new/choose
14+
15+
## Before Reporting an Issue
16+
17+
Search [existing pull requests and issues](https://github.com/per1234/forum-assets/issues?q=) to see if it was already reported.<br />
18+
19+
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 👍.
20+
21+
## Qualities of an Excellent Report
22+
23+
- Concise and descriptive issue title.<br />
24+
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.
25+
- Describe the issue and what behavior you were expecting.
26+
- Be responsive.<br />
27+
We may need you to provide additional information in order to investigate and resolve the issue.<br />
28+
Make sure your GitHub account is configured so that you will receive notifications of responses to your issue report.
+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Pull Request Guide
2+
3+
The development is done via a formal process that allows all interested parties the opportunity to participate in an efficient manner:
4+
5+
## 1. Fork
6+
7+
Forking a GitHub repository creates a copy of it under your account. You will stage contributions in your fork of this project.
8+
9+
[More information about forking repositories](https://docs.github.com/get-started/quickstart/fork-a-repo)
10+
11+
## 2. Branch
12+
13+
Create a branch in your fork to contain the changes for your contribution.
14+
15+
---
16+
17+
**** You must make a separate branch in your fork for each pull request you submit.
18+
19+
---
20+
21+
[More information about branches](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches)
22+
23+
## 3. Make your changes
24+
25+
See [the development guide](../development.md#development-guide) for more information.
26+
27+
## 4. Commit
28+
29+
Once the work on your change is complete, add it to the revision history of the Git repository by making a commit.
30+
31+
[More information about commits](https://git-scm.com/docs/git-commit)
32+
33+
## 5. Pull request
34+
35+
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.
36+
37+
[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)
38+
39+
## 6. Resolve CI failures
40+
41+
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:
42+
43+
![checks](assets/checks.png)
44+
45+
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.
46+
47+
---
48+
49+
**** 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.
50+
51+
---
52+
53+
## 7. Review
54+
55+
All interested parties will now have the opportunity to review the pull request. They can request changes, make general comments and discussion, or approve the pull request.
56+
57+
[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)
58+
59+
## 8. Resolve change requests
60+
61+
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.
62+
63+
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).
64+
65+
## 9. Merge
66+
67+
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.
68+
69+
## 10. Publish
70+
71+
If the contribution modified content that is published on the Arduino Forum, a maintainer will publish the updated content.
72+
73+
Thanks so much for your contribution!

docs/development.md

+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Development Guide
2+
3+
## Add or Remove a Pinned Topic
4+
5+
"Pinned" topics are always shown at the top of the category's listing.
6+
7+
1. Find the category for the pinned topic under [the `content/categories` folder](../content/categories).
8+
1. Open the `_pins.md` file you find there.
9+
1. Add or remove the URL of the topic to the list.
10+
1. Save the file.
11+
1. Submit a [pull request](contributor-guide/pull-requests.md) for the change.
12+
13+
## Change the Description of a Topic
14+
15+
The content of the "**About the \_\_\_\_\_ category**" topics is used as the category description in the category listings. This description helps the users to understand whether the category is the appropriate place for a topic they are creating.
16+
17+
1. Find the category for the pinned topic under [the `content/categories` folder](../content/categories).
18+
1. Open the `_topics` subfolder.
19+
1. Find the subfolder for the category's "**About the \_\_\_\_\_ category**" topic is used as the category description in the category listings.
20+
1. Open the `1.md` file from the subfolder.
21+
1. Make the desired changes to the content of the file.
22+
1. Save the file.
23+
1. Submit a [pull request](contributor-guide/pull-requests.md) for the change.
24+
25+
## Add or Edit a Discourse Template
26+
27+
["Discourse Templates"](https://meta.discourse.org/t/discourse-templates/229250) provide standardized reusable content for common posts.
28+
29+
Templates are used in posts by clicking the **** icon on the post composer toolbar and then selecting "**Insert template**" from the menu.
30+
31+
---
32+
33+
❗ The Discourse Templates feature is only available for staff members (moderators and administrators).
34+
35+
---
36+
37+
### Add Template
38+
39+
The [existing templates](../content/categories/templates/_topics) will serve as a reference for the addition of new template source content.
40+
41+
1. Open [the `content/categories/templates/_topics` folder](../content/categories/templates/_topics).
42+
1. Create a folder named according to the template title.
43+
1. Create a file named `README.md`.
44+
1. Add the template title as an H1 [heading](https://www.markdownguide.org/basic-syntax/#headings). <br />
45+
For example:
46+
```markdown
47+
# Some Amazing Template
48+
```
49+
**** This will be the title shown in the "**Insert template**" interface on the forum.
50+
1. Save the file.
51+
1. Create a file named `1.md`.
52+
1. Add the template text to the file.
53+
1. Save the file.
54+
1. Submit a [pull request](contributor-guide/pull-requests.md) for the change.
55+
56+
### Edit Template
57+
58+
1. Open [the `content/categories/templates/_topics` folder](../content/categories/templates/_topics).
59+
1. Find the folder of the template you want to edit.
60+
1. If you want to edit the template title, open the `README.md` file and edit the text of the H1 [heading](https://www.markdownguide.org/basic-syntax/#headings). <br />
61+
For example:
62+
```markdown
63+
# Some Amazing Template
64+
```
65+
1. If you want to edit the template text, open the `1.md` file and edit the text.
66+
1. Save the file.
67+
1. Submit a [pull request](contributor-guide/pull-requests.md) for the change.
68+
69+
## Add an Asset Topic
70+
71+
New asset topics can be added to the repository to enable collaborative development and maintenance of its content.
72+
73+
---
74+
75+
❗ In order to allow maintenance to continue in perpetuity, ownership of all posts maintained in this repository must be transferred to the forum's `@system` user.
76+
77+
---
78+
79+
1. Find the category for the topic under [the `content/categories` folder](../content/categories).
80+
1. Open the `_topics` subfolder.
81+
1. Create a folder named according to the topic title.
82+
1. Create a file named `README.md`.
83+
1. Add the topic title as an H1 [heading](https://www.markdownguide.org/basic-syntax/#headings). <br />
84+
For example:
85+
```markdown
86+
# Some Valuable Topic
87+
```
88+
1. If the topic is already published on Arduino Forum, add the URL under a `## Published At` heading.
89+
For example:
90+
```markdown
91+
## Published At
92+
93+
https://forum.arduino.cc/t/some-valuable-topic/1234
94+
```
95+
1. Save the file.
96+
1. Create a file named `1.md`.
97+
1. Add the post text to the file.
98+
1. Save the file.
99+
1. Repeat steps (8)-(10) for any additional asset posts in the topic (naming the file according to the post number).
100+
1. Submit a [pull request](contributor-guide/pull-requests.md) for the change.
101+
102+
## Validating Your Work
103+
104+
When you submit a pull request to the repository, automated checks will run to detect any problems or inconsistencies. It is possible to also run these checks locally during the development if you like.
105+
106+
### Prerequisites
107+
108+
The following development tools must be available in your local environment:
109+
110+
- [**Task**](https://taskfile.dev/installation/)
111+
- [**Node.js**](https://nodejs.dev/en/download/)
112+
- [**Python**](https://www.python.org/downloads/)
113+
- [**Poetry**](https://python-poetry.org/docs/#installation)
114+
115+
### Running Checks
116+
117+
Execute the following command from the root of the repository to run all available checks:
118+
119+
```text
120+
task check
121+
```
122+
123+
If you prefer to run specific checks individually, run the `task` command to get a list of available tasks.
124+
125+
### Automatic Corrections
126+
127+
Tools are provided to automatically bring the project into compliance with some of the required checks.
128+
129+
Execute the following command from the root of the repository to run all available corrections:
130+
131+
```text
132+
task fix
133+
```
134+
135+
If you prefer to run specific correction operations individually, run the `task` command to get a list of available tasks.

0 commit comments

Comments
 (0)