Skip to content

Commit 6351083

Browse files
committed
repo: add CONTRIBUTING.md document
1 parent c470727 commit 6351083

File tree

1 file changed

+148
-0
lines changed

1 file changed

+148
-0
lines changed

CONTRIBUTING.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
<!-- omit in toc -->
2+
3+
# Contributing to Backtrace Javascript SDK
4+
5+
First off, thanks for taking the time to contribute! ❤️
6+
7+
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
8+
9+
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
10+
>
11+
> - Star the project
12+
> - Refer this project in your project's readme
13+
> - Mention the project at local meetups and tell your friends/colleagues
14+
15+
<!-- omit in toc -->
16+
17+
## Table of Contents
18+
19+
- [Code of Conduct](#code-of-conduct)
20+
- [I Have a Question](#i-have-a-question)
21+
- [I Want To Contribute](#i-want-to-contribute)
22+
- [Reporting Bugs](#reporting-bugs)
23+
- [Suggesting Enhancements](#suggesting-enhancements)
24+
- [Your First Code Contribution](#your-first-code-contribution)
25+
- [Improving The Documentation](#improving-the-documentation)
26+
- [Styleguides](#styleguides)
27+
- [Commit Messages](#commit-messages)
28+
- [Join The Project Team](#join-the-project-team)
29+
30+
## Code of Conduct
31+
32+
This project and everyone participating in it is governed by the
33+
[Sauce Labs Code of Conduct](https://docs.saucelabs.com/contributing/code-of-conduct/).
34+
By participating, you are expected to uphold this code. Please report unacceptable behavior
35+
to opensource@saucelabs.com.
36+
37+
## I Have a Question
38+
39+
Before you ask a question, it is best to search for existing [Issues](/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue.
40+
41+
If you then still feel the need to ask a question and need clarification, we recommend the following:
42+
43+
- Open an [Issue](/issues/new).
44+
- Provide as much context as you can about what you're running into.
45+
- Provide project and platform versions (nodejs, npm, SDK version, etc), depending on what seems relevant.
46+
47+
We will then take care of the issue as soon as possible.
48+
49+
## I Want To Contribute
50+
51+
> ### Legal Notice <!-- omit in toc -->
52+
>
53+
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
54+
55+
### Reporting Bugs
56+
57+
<!-- omit in toc -->
58+
59+
#### Before Submitting a Bug Report
60+
61+
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
62+
63+
- Make sure that you are using the latest version.
64+
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the relevant SDK documentation. If you are looking for support, you might want to check [this section](#i-have-a-question)).
65+
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](issues?q=label%3Abug).
66+
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
67+
- Collect information about the bug:
68+
- Stack trace (Traceback)
69+
- OS, Platform and Version
70+
- Version of the runtime environment, SDK version, tooling version, package manager, depending on what seems relevant.
71+
- Possibly your input and the output
72+
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
73+
74+
<!-- omit in toc -->
75+
76+
#### How Do I Submit a Good Bug Report?
77+
78+
> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to security@backtrace.io.
79+
80+
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
81+
82+
- Open an [Issue](/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
83+
- Explain the behavior you would expect and the actual behavior.
84+
- Please provide as much context as possible and describe the _reproduction steps_ that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
85+
- Provide the information you collected in the previous section.
86+
87+
Once it's filed:
88+
89+
- The project team will label the issue accordingly.
90+
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
91+
- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution).
92+
93+
### Suggesting Enhancements
94+
95+
This section guides you through submitting an enhancement suggestion for Backtrace Javascript SDK, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
96+
97+
<!-- omit in toc -->
98+
99+
#### Before Submitting an Enhancement
100+
101+
- Make sure that you are using the latest version.
102+
- Read the relevant SDK/tooling documentation carefully and find out if the functionality is already covered, maybe by an individual configuration.
103+
- Perform a [search](/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
104+
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
105+
106+
<!-- omit in toc -->
107+
108+
#### How Do I Submit a Good Enhancement Suggestion?
109+
110+
Enhancement suggestions are tracked as [GitHub issues](/issues).
111+
112+
- Use a **clear and descriptive title** with valid prefix for the issue to identify the suggestion.
113+
- We use **squash commits** when merging pull requests, so the title should resemble a [commit message](#commit-messages)
114+
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
115+
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
116+
- **Explain why this enhancement would be useful** to most Backtrace Javascript SDK users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
117+
118+
### Your First Code Contribution
119+
120+
- Make sure to use `npm` that support workspaces
121+
- Add unit tests/smoketests for your change
122+
- Run an example with your code change and check the basic functionality
123+
- If this is a public API change:
124+
- try to not introduce breaking changes if possible
125+
- update the documentation
126+
127+
## Styleguides
128+
129+
### Commit Messages
130+
131+
Commit message should be short and descriptive of the change. They must also include a valid prefix containing the name of the changed package(s), e.g. `sdk-core` or `node`, separated by commas. If the change is specific to a file, you may use its name in the message.
132+
133+
It is best to keep separate package changes in separate commits, if possible.
134+
135+
Valid examples of commits:
136+
137+
- `sdk-core: fix invalid ID in breadcrumb generation`
138+
- `node: add CPU type to MachineAttributeProvider.ts`
139+
- `sdk-core, node: add FileSystem.doesExist`
140+
141+
Commit messages to avoid:
142+
143+
- `sdk-core: fix error` (ambiguous message - what was the error?)
144+
- `change error message in Node on invalid breadcrumb` (missing package prefix)
145+
146+
## Attribution
147+
148+
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!

0 commit comments

Comments
 (0)