Skip to content

Commit 50db38b

Browse files
committed
feat: Add code of conduct and contributing guide
1 parent dad94ff commit 50db38b

File tree

2 files changed

+286
-0
lines changed

2 files changed

+286
-0
lines changed

CODE_OF_CONDUCT.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
2+
# Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, caste, color, religion, or sexual
11+
identity and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the overall
27+
community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or advances of
32+
any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email address,
36+
without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official email address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement available in [opensource.michelin.io](https://opensource.michelin.io/) contact.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.1, available at
119+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120+
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123+
124+
For answers to common questions about this code of conduct, see the FAQ at
125+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126+
[https://www.contributor-covenant.org/translations][translations].
127+
128+
[homepage]: https://www.contributor-covenant.org
129+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130+
[Mozilla CoC]: https://github.com/mozilla/diversity
131+
[FAQ]: https://www.contributor-covenant.org/faq
132+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# Contributing Guidelines
2+
3+
_Pull requests, bug reports, and all other forms of contribution are welcomed and highly encouraged!_
4+
5+
## Contents
6+
7+
- [Contributing Guidelines](#contributing-guidelines)
8+
- [Contents](#contents)
9+
- [Code of Conduct](#code-of-conduct)
10+
- [Asking Questions](#asking-questions)
11+
- [Opening an Issue](#opening-an-issue)
12+
- [Reporting Security Issues](#reporting-security-issues)
13+
- [Bug Reports and Other Issues](#bug-reports-and-other-issues)
14+
- [Feature Requests](#feature-requests)
15+
- [Triaging Issues](#triaging-issues)
16+
- [Submitting Pull Requests](#submitting-pull-requests)
17+
- [Writing Commit Messages](#writing-commit-messages)
18+
- [Code Review](#code-review)
19+
- [Coding Style](#coding-style)
20+
- [Certificate of Origin](#certificate-of-origin)
21+
- [Credits](#credits)
22+
23+
> **This guide serves to set clear expectations for everyone involved with the project so that we can improve it together while also creating a welcoming space for everyone to participate. Following these guidelines will help ensure a positive experience for contributors and maintainers.**
24+
25+
## Code of Conduct
26+
27+
Please review our [Code of Conduct](CODE_OF_CONDUCT.md). It is in effect at all times. We expect it to be honored by everyone who contributes to this project. Inappropriate behavior will not be tolerated.
28+
29+
## Asking Questions
30+
31+
We don't use GitHub as a support forum. In short, GitHub issues are not the appropriate place to debug your specific project, but should be reserved for filing bugs and feature requests.
32+
33+
## Opening an Issue
34+
35+
Before [creating an issue](https://help.github.com/en/github/managing-your-work-on-github/creating-an-issue), check if you are using the latest version of the project. If you are not up-to-date, see if updating fixes your issue first.
36+
37+
### Reporting Security Issues
38+
39+
**Do not** file a public issue for security vulnerabilities. Instead, send your report privately to `TODO: Insert CERT email address`. This will help ensure that any vulnerabilities that are found can be disclosed responsibly to any affected parties.
40+
We take [responsible disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure) seriously, as they can affect confidence/trust in our project. The person who notified us of the vulnerability will be informed promptly that the problem is being addressed. Wherever possible, and depending on its criticality, the vulnerability should be corrected within the allotted time (generally between 90 and 120 days).
41+
42+
### Bug Reports and Other Issues
43+
44+
A great way to contribute to the project is to send a detailed issue when you encounter a problem. We always appreciate a well-written, thorough bug report. :v:
45+
46+
In short, since you are most likely a developer, **provide a ticket that you would like to receive**.
47+
48+
- **Review the documentation** before opening a new issue.
49+
- **Do not open a duplicate issue**. Search through existing issues to see if your issue has previously been reported. If your issue exists, comment with any additional information you have. You may simply note "_I have this problem too_", which helps prioritize the most common problems and requests.
50+
- **Prefer using [reactions](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/)**, not comments, if you simply want to "+1" an existing issue.
51+
- **Fully complete the provided issue template.** The bug report template requests all the information we need to quickly and efficiently address your issue. Be clear, concise, and descriptive. Provide as much information as you can, including steps to reproduce, stack traces, compiler errors, library versions, OS versions, and screenshots (if applicable).
52+
- **Use [GitHub-flavored Markdown](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax).** Especially put code blocks and console outputs in backticks (```). This improves readability.
53+
54+
## Feature Requests
55+
56+
Feature requests are welcome! While we will consider all requests, we cannot guarantee your request will be accepted. We want to avoid [feature creep](https://en.wikipedia.org/wiki/Feature_creep). Your idea may be great, but also out-of-scope for the project. If accepted, we cannot make any commitments regarding the timeline for implementation and release. However, you are welcome to submit a pull request to help!
57+
58+
- **Do not open a duplicate feature request**. Search for existing feature requests first. If you find your feature (or one very similar) previously requested, comment on that issue.
59+
- **Fully complete the provided issue template**. The feature request template asks for all necessary information for us to begin a productive conversation.
60+
- Be precise about the proposed outcome of the feature and how it relates to existing features. Include implementation details if possible.
61+
62+
## Triaging Issues
63+
64+
You can triage issues which may include reproducing bug reports or asking for additional information, such as version numbers or reproduction instructions. Any help you can provide to quickly resolve an issue is very much appreciated!
65+
66+
## Submitting Pull Requests
67+
68+
We **love** pull requests! Before [forking the repository](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) and [creating a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests) for non-trivial changes, it is usually best to first open an issue to discuss the changes, or discuss your intended approach for solving the problem in the comments for an existing issue.
69+
70+
The more you contribute the more responsibility you will earn. Leadership roles in this project are merit-based and earned by peer acclaim.
71+
72+
_Note: All contributions will be licensed under the project's license._
73+
74+
- **Smaller is better.** Submit **one** pull request per bug fix or feature. A pull request should contain isolated changes pertaining to a single bug fix or feature implementation. **Do not** refactor or reformat code that is unrelated to your change. It is better to **submit many small pull requests** rather than a single large one. Enormous pull requests will take enormous amounts of time to review, or may be rejected altogether.
75+
- **Coordinate bigger changes.** For large and non-trivial changes, open an issue to discuss a strategy with the maintainers. Otherwise, you risk doing a lot of work for nothing!
76+
- **Prioritize understanding over cleverness.** Write code clearly and concisely. Remember that source code usually gets written once and read often. Ensure the code is clear to the reader. The purpose and logic should be obvious to a reasonably skilled developer, otherwise you should add a comment that explains it.
77+
- **Include test coverage.** Add unit tests or UI tests when possible. Follow existing patterns for implementing tests.
78+
- **Add documentation.** Document your changes with code comments or in existing guides.
79+
- **Update the CHANGELOG** for all enhancements and bug fixes. Include the corresponding issue number if one exists, and your GitHub username. (example: "- Fixed crash in profile view. #123 @jessesquires")
80+
- **Use the repo's default branch.** Branch from and [submit your pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) to the repo's default branch. Usually this is `main`, but it could be `dev`, `develop`, or `master`.
81+
- **[Resolve any merge conflicts](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github)** that occur.
82+
- **Promptly address any CI failures**. If your pull request fails to build or pass tests, please push another commit to fix it.
83+
84+
## Writing Commit Messages
85+
86+
Please [write a great commit message](https://chris.beams.io/posts/git-commit/).
87+
88+
1. Separate subject from body with a blank line
89+
1. Limit the subject line to 50 characters
90+
1. Use the imperative mood in the subject line (example: "Fix networking issue")
91+
1. Wrap the body at about 72 characters
92+
1. Use the body to explain **why**, _not what and how_ (the code shows that!)
93+
1. If applicable, prefix the title with the relevant component name. (examples: "[Docs] Fix typo", "[Profile] Fix missing avatar")
94+
95+
```text
96+
[TAG] Short summary of changes in 50 chars or less
97+
98+
Add a more detailed explanation here, if necessary. Possibly give
99+
some background about the issue being fixed, etc. The body of the
100+
commit message can be several paragraphs. Further paragraphs come
101+
after blank lines and please do proper word-wrap.
102+
103+
Wrap it to about 72 characters or so. In some contexts,
104+
the first line is treated as the subject of the commit and the
105+
rest of the text as the body. The blank line separating the summary
106+
from the body is critical (unless you omit the body entirely);
107+
various tools like `log`, `shortlog` and `rebase` can get confused
108+
if you run the two together.
109+
110+
Explain the problem that this commit is solving. Focus on why you
111+
are making this change as opposed to how or what. The code explains
112+
how or what. Reviewers and your future self can read the patch,
113+
but might not understand why a particular solution was implemented.
114+
Are there side effects or other unintuitive consequences of this
115+
change? Here's the place to explain them.
116+
117+
- Bullet points are okay, too
118+
119+
- A hyphen or asterisk should be used for the bullet, preceded
120+
by a single space, with blank lines in between
121+
122+
Note the fixed or relevant GitHub issues at the end:
123+
124+
Resolves: #123
125+
See also: #456, #789
126+
```
127+
128+
## Code Review
129+
130+
- **Review the code, not the author.** Look for and suggest improvements without disparaging or insulting the author. Provide actionable feedback and explain your reasoning.
131+
- **You are not your code.** When your code is critiqued, questioned, or constructively criticized, remember that you are not your code. Do not take code review personally.
132+
- **Always do your best.** No one writes bugs on purpose. Do your best, and learn from your mistakes.
133+
- Kindly note any violations to the guidelines specified in this document.
134+
135+
## Coding Style
136+
137+
Consistency is the most important. Follow the[existing coding style, formatting, and naming conventions of the file you are modifying and of the overall project. When possible, these will be enforced with a linter. Failure to do so will result in a prolonged review process that has to focus on updating the superficial aspects of your code, rather than improving its functionality and performance.
138+
139+
Adhering to this code style ensures consistency and helps maintain code quality throughout the project.
140+
141+
## Certificate of Origin
142+
143+
From [_Developer's Certificate of Origin 1.1_](https://developercertificate.org/)
144+
145+
By making a contribution to this project, I certify that:
146+
147+
> 1. The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
148+
> 1. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
149+
> 1. The contribution was provided directly to me by some other person who certified (1), (2) or (3) and I have not modified it.
150+
> 1. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
151+
152+
## Credits
153+
154+
Based on [work](https://github.com/jessesquires/.github/blob/main/CONTRIBUTING.md) by [@jessesquires](https://github.com/jessesquires).

0 commit comments

Comments
 (0)