Skip to content

Commit b14e81c

Browse files
committed
docs: add CONTRIBUTING.md
1 parent c28ca1f commit b14e81c

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/CONTRIBUTING.md

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing to google-sr
2+
3+
Thank you for your interest in contributing! ❤️
4+
We welcome bug fixes, features, and documentation improvements.
5+
6+
> If you like the project, consider giving it a star! ⭐
7+
8+
## Code of Conduct
9+
10+
This project follows the [Code of Conduct](CODE_OF_CONDUCT.md).
11+
Please report violations via Discord or the issue tracker.
12+
13+
## How Can I Contribute?
14+
15+
### Prerequisites
16+
17+
Ensure you have the following installed:
18+
19+
- [Node.js](https://nodejs.org/)
20+
- [pnpm](https://pnpm.io/)
21+
22+
### Setup
23+
24+
To get started, please follow these steps:
25+
26+
1. Fork and clone the repository to your local machine, make sure you're on the `master` branch.
27+
2. Install the dependencies by running `pnpm install` in the root of the monorepo.
28+
3. Run `pnpm run build` to build the packages.
29+
4. Run `pnpm run dev` to start the development server.
30+
5. Make your changes.
31+
6. Run `pnpm run test` to run the tests.
32+
7. Once you're done, commit your changes (make sure to follow the [Conventional Commit format](https://www.conventionalcommits.org/en/v1.0.0/))
33+
8. Push & open a PR to `master` branch.
34+
35+
### Scraping search results
36+
37+
Always use this **user agent** when scraping:
38+
`Links (2.29; Linux 6.11.0-13-generic x86_64; GNU C 13.2; text)`
39+
40+
The `search-dump` script is provided to help you dump search results with an identical
41+
setup to the one used in google-sr.
42+
43+
Run `search-dump.js` to dump search results:
44+
```bash
45+
# change directory to the search-dump script
46+
cd apps/scraper
47+
48+
# run the script, all arguments are joined with a space as the search query
49+
node search-dump.js "search query"
50+
```
51+
52+
### Reporting Bugs
53+
54+
Before creating bug reports, please check the [existing issues](https://github.com/typicalninja/google-sr/issues)
55+
to see if the issue has already been reported.
56+
If you find your issue already reported, please add a reaction to the issue to show that you are also facing the issue.
57+
58+
When you are creating a bug report, please include as many details as possible.
59+
Please include the following information:
60+
* A clear and descriptive title.
61+
* A detailed description of the issue.
62+
* Steps to reproduce the issue.
63+
* The expected behavior.
64+
* The actual behavior.
65+
* Screenshots or videos of the issue.
66+
* Any other relevant information.
67+
68+
A bug report template is available to guide you through the process.
69+
70+
### License
71+
72+
By contributing, you agree that your contributions will be licensed under the [MIT license](../LICENSE).

0 commit comments

Comments
 (0)