Skip to content

Commit 3842091

Browse files
Add contributing guidelines
1 parent f016f37 commit 3842091

1 file changed

Lines changed: 120 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Contributing to `tracelib`
2+
3+
**Thank you for your interest in `tracelib`. Your contributions are highly welcome.**
4+
5+
There are multiple ways of getting involved:
6+
7+
- [Report a bug](#report-a-bug)
8+
- [Suggest a feature](#suggest-a-feature)
9+
- [Contribute code](#contribute-code)
10+
11+
Below are a few guidelines we would like you to follow.
12+
If you need help, please reach out to us by opening an issue.
13+
14+
## Report a bug
15+
Reporting bugs is one of the best ways to contribute. Before creating a bug report, please check that an [issue](/issues) reporting the same problem does not already exist. If there is such an issue, you may add your information as a comment.
16+
17+
To report a new bug you should open an issue that summarizes the bug and set the label to "bug".
18+
19+
If you want to provide a fix along with your bug report: That is great! In this case please send us a pull request as described in section [Contribute Code](#contribute-code).
20+
21+
## Suggest a feature
22+
To request a new feature you should open an [issue](../../issues/new) and summarize the desired functionality and its use case. Set the issue label to "feature".
23+
24+
## Contribute code
25+
This is an outline of what the workflow for code contributions looks like
26+
27+
- Check the list of open [issues](../../issues). Either assign an existing issue to yourself, or
28+
create a new one that you would like work on and discuss your ideas and use cases.
29+
30+
It is always best to discuss your plans beforehand, to ensure that your contribution is in line with our goals.
31+
32+
- Fork the repository on GitHub
33+
- Create a topic branch from where you want to base your work. This is usually master.
34+
- Open a new pull request, label it `work in progress` and outline what you will be contributing
35+
- Make commits of logical units.
36+
- Make sure you sign-off on your commits `git commit -s -m "adding X to change Y"`
37+
- Write good commit messages (see below).
38+
- Push your changes to a topic branch in your fork of the repository.
39+
- As you push your changes, update the pull request with new infomation and tasks as you complete them
40+
- Project maintainers might comment on your work as you progress
41+
- When you are done, remove the `work in progess` label and ping the maintainers for a review
42+
- Your pull request must receive a :thumbsup: from two [maintainers](MAINTAINERS)
43+
44+
### Prerequisites
45+
46+
To build and work on this project you need to install:
47+
48+
- [Node.js](https://nodejs.org/en/) (LTS)
49+
50+
### Check out code
51+
52+
To get the code base, have [git](https://git-scm.com/downloads) installed and run:
53+
54+
```sh
55+
$ git clone git@github.com:saucelabs/tracelib.git
56+
```
57+
58+
then ensure to install all project dependencies:
59+
60+
```sh
61+
$ cd traceliv
62+
$ npm install
63+
```
64+
65+
You can find a fixture tracelog to test API changes in the [test directory](https://github.com/saucelabs/tracelib/blob/master/tests/__fixtures__/jankTraceLog.json).
66+
67+
### Build Project
68+
69+
To compile all TypeScript files, run:
70+
71+
```sh
72+
$ npm run build
73+
```
74+
75+
In order to automatically re-compile the files when files change, you can use the watch command:
76+
77+
```sh
78+
$ npm run watch
79+
```
80+
81+
### Test Project
82+
83+
To test the project, run:
84+
85+
```sh
86+
$ npm run test
87+
```
88+
89+
### Commit messages
90+
Your commit messages ideally can answer two questions: what changed and why. The subject line should feature the “what” and the body of the commit should describe the “why”.
91+
92+
When creating a pull request, its description should reference the corresponding issue id.
93+
94+
### Sign your work / Developer certificate of origin
95+
All contributions (including pull requests) must agree to the Developer Certificate of Origin (DCO) version 1.1. This is exactly the same one created and used by the Linux kernel developers and posted on http://developercertificate.org/. This is a developer's certification that he or she has the right to submit the patch for inclusion into the project. Simply submitting a contribution implies this agreement, however, please include a "Signed-off-by" tag in every patch (this tag is a conventional way to confirm that you agree to the DCO) - you can automate this with a [Git hook](https://stackoverflow.com/questions/15015894/git-add-signed-off-by-line-using-format-signoff-not-working)
96+
97+
```
98+
git commit -s -m "adding X to change Y"
99+
```
100+
101+
## Release Project
102+
103+
Contributor with release rights can release the project by calling one of the following commands:
104+
105+
```sh
106+
# for patch releases
107+
$ npm run release:patch
108+
# for minor releases
109+
$ npm run release:minor
110+
# for major releases
111+
$ npm run release:major
112+
```
113+
114+
Ensure you release by following the [semantic versioning](https://semver.org/) principle.
115+
116+
---
117+
118+
**Have fun, and happy hacking!**
119+
120+
Thanks for your contributions!

0 commit comments

Comments
 (0)