Skip to content

Commit

Permalink
6404: prevent contributors from opening a PR on a main branch (#6419)
Browse files Browse the repository at this point in the history
#6404

Used a Git hook`(pre-push)` to prevent pull requests from being created
from the main branch.
pre-push hook ref: https://git-scm.com/docs/git-push
  • Loading branch information
rakeshkumar1019 authored Jul 26, 2024
1 parent 1529148 commit 0349d02
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,35 +42,39 @@ Therefore, ensure you are assigned to an issue before beginning work on it.
git clone https://github.com/yourusername/twenty.git
cd twenty
```
3. **Create a New Branch:** Create a new branch for your changes instead of using the main branch.

```shell
git checkout -b your-branch-name
```

3. **Make Changes:** Make your desired changes and ensure that your code adheres to Twenty's coding standards.
4. **Make Changes:** Make your desired changes and ensure that your code adheres to Twenty's coding standards.


4. **Test Locally:** Test your changes locally to ensure they work as expected.
5. **Test Locally:** Test your changes locally to ensure they work as expected.


5. **Commit Changes:** Commit your changes with a clear and concise commit message.
6. **Commit Changes:** Commit your changes with a clear and concise commit message.


```shell
git commit -m "Add your detailed description here"
```
6. **Push Changes:** Push your changes to your forked repository.
7. **Push Changes:** Push your changes to your forked repository.


```shell
git push origin branch-name
git push origin your-branch-name
```


7. **Create a Pull Request:** Go to the original Twenty repository and create a pull request. Please provide a detailed description of your changes. To have your pull request accepted, you must sign a CLA.
8. **Create a Pull Request:** Go to the original Twenty repository and create a pull request. Please provide a detailed description of your changes. To have your pull request accepted, you must sign a CLA.


8. **Code Review:** Your pull request will undergo a code review. Note that you might need to make any necessary adjustments based on feedback.
9. **Code Review:** Your pull request will undergo a code review. Note that you might need to make any necessary adjustments based on feedback.


9. **Merge:** Once approved, maintainers will merge your pull request into the main repository.
10. **Merge:** Once approved, maintainers will merge your pull request into the main repository.


<br>
Expand Down

0 comments on commit 0349d02

Please sign in to comment.