Skip to content

Commit 7c2d8e0

Browse files
authored
Merge pull request #40 from Shourya742/pre-push-hook
git hooks
2 parents 2d31011 + ceb298c commit 7c2d8e0

2 files changed

Lines changed: 93 additions & 0 deletions

File tree

.githooks/pre-push

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
cargo fmt -- --check
3+
if [ $? -ne 0 ]; then
4+
echo "Rustfmt failed. Please format your code."
5+
exit 1
6+
fi
7+
8+
cargo clippy --workspace --all-targets -- -D warnings
9+
if [ $? -ne 0 ]; then
10+
echo "Clippy found issues. Please fix them."
11+
exit 1
12+
fi
13+
14+
echo "All checks passed. Proceeding with push..."

CONTRIBUTING.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<!-- omit in toc -->
2+
# Contributing to the Benchmarking Tool
3+
4+
First off, thank you for taking the time to contribute! ❤️
5+
6+
All types of contributions are encouraged and valued. Please refer to the [Table of Contents](#table-of-contents) for various ways you can help and details on how this project handles contributions. Be sure to read the relevant sections before contributing, it will make things easier for us maintainers and provide a smoother experience for everyone involved. The community looks forward to your contributions! 🎉
7+
8+
> If you like the project but don’t have time to contribute, that's perfectly fine. There are other simple ways to support the project and show your appreciation, which we would greatly appreciate:
9+
> - Star the project
10+
> - Tweet about it
11+
> - Mention this project in your project's README
12+
> - Share the project at local meetups and with your friends/colleagues
13+
14+
<!-- omit in toc -->
15+
## Table of Contents
16+
17+
- [I Have a Question](#i-have-a-question)
18+
- [I Want To Contribute](#i-want-to-contribute)
19+
- [Project Communications](#project-communications)
20+
- [Contribution Workflow](#contribution-workflow)
21+
- [Your First Code Contribution](#your-first-code-contribution)
22+
23+
24+
## I Have a Question
25+
26+
> Before asking a question, please ensure you’ve read the documentation available in the `docs` directory.
27+
28+
The best way to ask a question is by joining our community on [Discord](https://discord.com/invite/fsEW23wFYs). The most suitable place to post your question is `#benchmarking-tool`
29+
30+
If you still need clarification after that, we recommend the following:
31+
32+
- Open an [Issue](https://github.com/stratum-mining/benchmarking-tool/issues).
33+
- Provide as much context as possible about the issue you're facing.
34+
35+
We will address your issue as soon as possible.
36+
37+
### Project Communications
38+
39+
Most project communications occur on our [Discord](https://discord.gg/fsEW23wFYs) server. Discussions related to the benchmarking tool typically happen in the [benchmarking-tool](https://discord.gg/Kv6uucUq) channel.
40+
41+
Discussions about specific codebase work take place on GitHub, in [issues](https://github.com/stratum-mining/benchmarking-tool/issues) and [pull requests](https://github.com/stratum-mining/benchmarking-tool/pulls).
42+
43+
Our development calls are scheduled every Tuesday at 18:00 CET. You can see them in the Discord sidebar under Events and subscribe to be notified.
44+
45+
## I Want To Contribute
46+
47+
> 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.
48+
49+
### Contribution Workflow
50+
51+
The project follows an open contributor model, where anyone is welcome to contribute through reviews, documentation, testing, and patches. Follow these steps to contribute:
52+
53+
1. **Fork the Repository**
54+
55+
2. **Set Up Git Hooks**
56+
57+
`git config core.hooksPath .githooks`: This command configures Git to use the `.githooks` directory for all Git hooks.
58+
59+
3. **Create a Branch**
60+
61+
4. **Commit Your Changes**
62+
63+
5. **Submit a Pull Request**: Once you're satisfied with your changes, submit a pull request to the repository. Provide a clear and concise description of the changes you've made. If your pull request addresses an existing issue, reference the issue number in the description. To contribute to the protocol implementation, every PR must be opened against the `main` branch. To better understand the branch structure, please refer to [this guide](https://github.com/stratum-mining/stratum/blob/main/RELEASE.md#principal-branches).
64+
65+
6. **Review and Iterate**
66+
67+
7. **Merge and Close**: Once your pull request has been approved and all discussions have been resolved, a project maintainer will merge your changes into the `main` branch. Your contribution will then officially become part of the project. The pull request will be closed, marking the completion of your contribution.
68+
69+
### Your First Code Contribution
70+
71+
> To contribute, a basic understanding of Git and GitHub is needed. If you're not familiar with them, check out [this resource](https://docs.github.com/en/get-started/start-your-journey/git-and-github-learning-resources) to learn how to use them.
72+
73+
Not sure where to start contributing to SRI? You can begin by looking through issues labeled `good first issue`:
74+
75+
* [Good first issue](https://github.com/stratum-mining/benchmarking-tool/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) - These issues typically require only a few lines of code and a test or two.
76+
77+
* [Help wanted](https://github.com/stratum-mining/benchmarking-tool/labels/help%20wanted) - issues which should be a bit more involved than good first issue issues.
78+
79+
Another way to better understand where to focus your contribution is by looking at our project board: https://github.com/orgs/stratum-mining/projects/10

0 commit comments

Comments
 (0)