|
| 1 | +# 📜 Conventions for contributions |
| 2 | +This file contains guidelines for creating *commits, PRs, branches, issues, and etc*. |
| 3 | +<br> |
| 4 | +**READ BEFORE CONTRIBUTING!** |
| 5 | +<br> |
| 6 | +If you have any questions on the following information, text me (Adil), I will take you through it. |
| 7 | + |
| 8 | +## ➕ Commits |
| 9 | +First, let's answer the questions **"When do I commit? And how many files do I commit at once?"** |
| 10 | +<br> |
| 11 | +The answer is very simple! Commit anytime you are done with ANY task. **For ex:** |
| 12 | +<br> |
| 13 | +<br> |
| 14 | +Let's say you are adding a login page. That's a big task, so you divide it on small ***sub-tasks***. (Make a login box, make a button, connect firebase, and etc.) Everytime you are done with a subtask, make a commit! |
| 15 | +<br> |
| 16 | +<br> |
| 17 | +**!!ATTENTION!!** Please, don't stage all the files in one commit. Stage only the files that are relevant to the subtask you finished. This is going to be unbelievably helpful down the road. |
| 18 | + |
| 19 | +### 🗃️ Commit message Structure |
| 20 | +--- |
| 21 | +Commits should consist of **three** parts: |
| 22 | +``` |
| 23 | +<type> Message |
| 24 | +<blank space> |
| 25 | +<body> |
| 26 | +``` |
| 27 | + |
| 28 | +### Example Commit |
| 29 | +--- |
| 30 | +``` |
| 31 | +fix: Fixed login button bug |
| 32 | +
|
| 33 | +The bug where login button would successfully authenticate the user, but didn't take him to the homepage as needed. |
| 34 | +``` |
| 35 | + |
| 36 | +### 📑 Commit Types |
| 37 | +--- |
| 38 | +Is recommended to be one of the below items. Only **feat** and **fix** show up in the changelog, in addition to breaking changes (See breaking changes section below). |
| 39 | + |
| 40 | +* **feat**: A new feature |
| 41 | +* **fix**: A bug fix |
| 42 | +* **docs**: Documentation only changes |
| 43 | +* **refactor**: A code change that neither fixes a bug or adds a feature |
| 44 | +* **test**: Adding missing tests |
| 45 | +* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation |
| 46 | + generation |
| 47 | + |
| 48 | +### ❗️ Breaking Changes |
| 49 | +--- |
| 50 | +Put any breaking changes with migration instructions in the commit body. |
| 51 | + |
| 52 | +If there is a breaking change, put "BREAKING CHANGE:" in your ***commit body***, and it will show up in the **changelog**. |
| 53 | + |
| 54 | +## 🌳 Branching |
| 55 | +Try to have 1 branch per 1 issue. When you take up an issue (task) to work on, assign it to yourself on the issue's page, and comment: "@AdiKsOnDev, I am working on this issue." |
| 56 | +<br> |
| 57 | +The name of the branch has to be as follows: |
| 58 | +``` |
| 59 | +<issue-number>-<branch-name> |
| 60 | +``` |
| 61 | + |
| 62 | +### 📄 Example branch name |
| 63 | +``` |
| 64 | +9-migrating-to-reactJS |
| 65 | +``` |
| 66 | + |
| 67 | +## Pull Requests (PRs) |
| 68 | +Make a pull request when you are completely done with your issue. Assign me as a reviewer & assignee, as the milestone choose the according milestone. |
| 69 | +### 🗃️ PR message structure |
| 70 | +--- |
| 71 | +``` |
| 72 | +<heading> |
| 73 | +<body> |
| 74 | +
|
| 75 | +TODO: (If something needs to be done further) |
| 76 | +
|
| 77 | +Closes Issue #number-of-the-issue |
| 78 | +``` |
| 79 | + |
| 80 | +### 📄 Example PR message |
| 81 | +--- |
| 82 | +``` |
| 83 | +Login Page finished |
| 84 | +
|
| 85 | +Connected firebase, cookies are stored in the browser and are called "user_id", "user_login" |
| 86 | +
|
| 87 | +TODO: Add login page to the Router in App.js |
| 88 | +
|
| 89 | +Closes Issue #5 |
| 90 | +``` |
0 commit comments