Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.

Commit 9a00ac8

Browse files
docs: add contribution doc
1 parent 53b3f9c commit 9a00ac8

File tree

1 file changed

+131
-0
lines changed

1 file changed

+131
-0
lines changed

CONTRIBUTING.md

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Contributing
2+
3+
We'd love for you to contribute to our source code and to help make Typeform products even better than they are today! Here are the guidelines we'd like you to follow:
4+
5+
* [Code of Conduct](#code-of-conduct)
6+
* [Issues and Bugs](#issues-and-bugs)
7+
* [Submission Guidelines](#submission-guidelines)
8+
* [Commit Message Guidelines](#commit-message-guidelines)
9+
10+
## Code of Conduct
11+
12+
As contributors and maintainers of this project, we pledge to respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities.
13+
14+
Communication through any of Typeform's channels (GitHub, StackOverflow, Twitter, etc.) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
15+
16+
We promise to extend courtesy and respect to everyone involved in this project regardless of gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We expect anyone contributing to the project to do the same.
17+
18+
If any member of the community violates this code of conduct, the maintainers of this Project project may take action, removing issues, comments, and PRs or blocking accounts as deemed appropriate.
19+
20+
If you are subject to or witness unacceptable behavior, or have any other concerns, please drop us a line at [email protected]
21+
22+
## Issues and Bugs
23+
24+
If you find a bug in the source code, a mistake in the documentation, or some other issue, you can help us by submitting an issue to our [GitHub Repository][github]. Even better you can submit a Pull Request with a test demonstrating the bug and a fix!
25+
26+
See [below](#submission-guidelines) for some guidelines.
27+
28+
## Submission Guidelines
29+
30+
### Submitting an Issue
31+
32+
Before you submit your issue, try searching [past issues][archive] or [StackOverflow][stackoverflow] for issues similar to your own. You can help us to maximize the effort we spend fixing issues, and adding new features, by not reporting duplicate issues.
33+
34+
If your issue appears to be a bug, and hasn't been reported, open a new issue. Providing the following information will increase the chances of your issue being dealt with quickly:
35+
36+
* **Description of the Issue** - if an error is being thrown a non-minified stack trace helps
37+
* **Motivation for or Use Case** - explain why this is a bug for you
38+
* **Related Issues** - has a similar issue been reported before?
39+
* **Environment Configuration** - is this a problem with Node.js, or only a specific browser? Is this only in a specific version of the library?
40+
* **Reproduce the Error** - provide a live example (like on [StackBlitz](https://stackblitz.com/)), a Github repo, or an unambiguous set of steps
41+
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be causing the problem (line of code or commit)
42+
43+
### Submitting a Pull Request
44+
45+
#### Pull Request Guidelines
46+
47+
* Search [GitHub][pulls] for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.
48+
* Create an issue to discuss a change before submitting a PR. We'd hate to have to turn down your contributions because of something that could have been communicated early on.
49+
* [Create a fork of the GitHub repo][fork-repo] to ensure that you can push your changes for us to review.
50+
* Make your changes in a new git branch:
51+
52+
```shell
53+
git checkout -b my-fix-branch dev
54+
```
55+
56+
* Create your patch, **including appropriate test cases**. Patches with tests are more likely to be merged.
57+
* Avoid checking in files that shouldn't be tracked (e.g `node_modules`, `gulp-cache`, `.tmp`, `.idea`). If your development setup automatically creates some of these files, please add them to the `.gitignore` at the root of the package (click [here][gitignore] to read more on how to add entries to the `.gitignore`).
58+
* Commit your changes using a commit message that follows our [commit message guidelines](#commit-message-guidelines).
59+
60+
```shell
61+
git commit -a
62+
```
63+
64+
_Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files._
65+
66+
* Test your changes locally to ensure everything is in good working order:
67+
68+
```shell
69+
# Run the server in one terminal window
70+
yarn server
71+
```
72+
73+
```shell
74+
# Run the tests in another terminal window
75+
yarn test:unit
76+
yarn test:integration
77+
```
78+
79+
* Push your branch to your fork on GitHub:
80+
81+
```shell
82+
git push origin my-fix-branch
83+
```
84+
85+
* In GitHub, send a pull request to `typeform-python-sdk:dev`.
86+
* All pull requests must be reviewed by a member of the Typeform team, who will merge it when/if they feel it is good to go.
87+
88+
## Commit Message Guidelines
89+
90+
We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. But also, we use the git commit messages to **generate the project change log**.
91+
92+
### Commit Message Format
93+
94+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**:
95+
96+
```text
97+
<type>(<scope>): <subject>
98+
<BLANK LINE>
99+
<body>
100+
<BLANK LINE>
101+
<footer>
102+
```
103+
104+
The **header** is mandatory and the **scope** of the header is optional.
105+
106+
### Revert
107+
108+
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.
109+
110+
### Type
111+
112+
Must be one of the following:
113+
114+
* **feat**: A new feature
115+
* **fix**: A bug fix
116+
* **docs**: Documentation only changes
117+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
118+
* **refactor**: A code change that neither fixes a bug nor adds a feature
119+
* **perf**: A code change that improves performance
120+
* **test**: Adding missing tests or correcting existing tests
121+
* **build**: Changes that affect the build system, CI configuration or external dependencies (example scopes: gulp, broccoli, npm)
122+
* **chore**: Other changes that don't modify `src` or `test` files
123+
124+
That's it! Thank you for your contribution!
125+
126+
[archive]: https://github.com/Typeform/typeform-python-sdk/issues?utf8=%E2%9C%93&q=is:issue
127+
[fork-repo]: https://github.com/Typeform/typeform-python-sdk/fork
128+
[github]: https://github.com/Typeform/typeform-python-sdk
129+
[gitignore]: https://git-scm.com/docs/gitignore
130+
[pulls]: https://github.com/Typeform/typeform-python-sdk/pulls
131+
[stackoverflow]: https://stackoverflow.com/questions/tagged/typeform

0 commit comments

Comments
 (0)