Skip to content

Commit

Permalink
Merge pull request stratum-mining#40 from Shourya742/pre-push-hook
Browse files Browse the repository at this point in the history
git hooks
  • Loading branch information
GitGab19 authored Aug 28, 2024
2 parents 2d31011 + ceb298c commit 7c2d8e0
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
cargo fmt -- --check
if [ $? -ne 0 ]; then
echo "Rustfmt failed. Please format your code."
exit 1
fi

cargo clippy --workspace --all-targets -- -D warnings
if [ $? -ne 0 ]; then
echo "Clippy found issues. Please fix them."
exit 1
fi

echo "All checks passed. Proceeding with push..."
79 changes: 79 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!-- omit in toc -->
# Contributing to the Benchmarking Tool

First off, thank you for taking the time to contribute! ❤️

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! 🎉

> 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:
> - Star the project
> - Tweet about it
> - Mention this project in your project's README
> - Share the project at local meetups and with your friends/colleagues
<!-- omit in toc -->
## Table of Contents

- [I Have a Question](#i-have-a-question)
- [I Want To Contribute](#i-want-to-contribute)
- [Project Communications](#project-communications)
- [Contribution Workflow](#contribution-workflow)
- [Your First Code Contribution](#your-first-code-contribution)


## I Have a Question

> Before asking a question, please ensure you’ve read the documentation available in the `docs` directory.
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`

If you still need clarification after that, we recommend the following:

- Open an [Issue](https://github.com/stratum-mining/benchmarking-tool/issues).
- Provide as much context as possible about the issue you're facing.

We will address your issue as soon as possible.

### Project Communications

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.

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).

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.

## I Want To Contribute

> 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.
### Contribution Workflow

The project follows an open contributor model, where anyone is welcome to contribute through reviews, documentation, testing, and patches. Follow these steps to contribute:

1. **Fork the Repository**

2. **Set Up Git Hooks**

`git config core.hooksPath .githooks`: This command configures Git to use the `.githooks` directory for all Git hooks.

3. **Create a Branch**

4. **Commit Your Changes**

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).

6. **Review and Iterate**

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.

### Your First Code Contribution

> 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.
Not sure where to start contributing to SRI? You can begin by looking through issues labeled `good first issue`:

* [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.

* [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.

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 comments on commit 7c2d8e0

Please sign in to comment.