mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-28 23:23:38 +00:00
Add pre-commit to CONTRIBUTING.md (#305)
* Add pre-commit to CONTRIBUTING.md * Update PR template
This commit is contained in:
2
.github/pull_request_template.md
vendored
2
.github/pull_request_template.md
vendored
@ -2,4 +2,4 @@
|
||||
Fixes #<PR_NUMBER/>
|
||||
|
||||
## Checklist before merging
|
||||
- [ ] If it's a frontend feature, I have ran prettier `cd frontend; npm run format`. If it's a mobile app feature I ran `cd mobile; npm run format`.
|
||||
- [ ] Make sure you have installed and initialized [pre-commit](https://pre-commit.com). `pip install pre-commit` and `pre-commit install`
|
||||
|
@ -21,13 +21,20 @@ Discussion about code changes happens in GitHub issues and pull requests.
|
||||
|
||||
All RoboSats contributors submit changes via pull requests. The workflow is as follows:
|
||||
|
||||
- Fork the repository
|
||||
- Create a topic branch from the `main` branch
|
||||
- Commit patches
|
||||
- Run formatter if the frontend was changed: `npm run format`
|
||||
- Squash redundant or unnecessary commits
|
||||
- Submit a pull request from your topic branch back to the `main` branch of the main repository
|
||||
- Make changes to the pull request if reviewers request them and request a re-review
|
||||
1. Fork the repository
|
||||
2. Create a topic branch from the `main` branch
|
||||
3. Install [pre-commit](https://pre-commit.com/#installation) and initialize it:
|
||||
- ```
|
||||
pip install pre-commit
|
||||
```
|
||||
- ```
|
||||
pre-commit install
|
||||
```
|
||||
Pre-commit installs git hooks that automatically checks the codebase for styleguide consistencies and runs formatters like prettier and black and performs other chores automatically on git events (mostly before a commit). If the pre-commit fails when you commit your changes, please fix the problems it points out.
|
||||
4. Commit patches
|
||||
6. Squash redundant or unnecessary commits
|
||||
7. Submit a pull request from your topic branch back to the `main` branch of the main repository
|
||||
8. Make changes to the pull request if reviewers request them and request a re-review
|
||||
|
||||
Pull requests should be focused on a single change. Do not mix, for example, refactorings with a bug fix or implementation of a new feature. This practice makes it easier for fellow contributors to review each pull request.
|
||||
|
||||
|
Reference in New Issue
Block a user