This doc defines a set of rules and protocols that must be strictly followed while contributing to this repository.
-
Use the
-m
flag only for minor changes. The message following the-m
flag must be of the below format :<Verb in present tense> <Action>
✅ Examples of valid messages:
- Added routes/routes.js file
- Update utils/validator.js file
- Change functionality of authentication process
❌ Examples of invalid messages:
- Routes.js has been updates
- Almost finished testing
- All changes done, ready for production :))
-
Before opening a PR, make sure you squash all your commits into one single commit using
git rebase
(squash). Instead of having 50 commits that describe 1 feature implementation, there must be one commit that describes everything that has been done so far. You can read up about it here.
NOTE: While squashing your commits to write a new one, do not make use of
-m
flag. In this case, a text editor window shall open. Write a title for the commit within 50-70 characters, leave a line and add an understandable description.
- Issues MUST be opened any time any of the following events occur :
- You encounter an issue such that a major (50 lines of code or above) portion of the code needs to be changed/added.
- You want Feature enhancements
- You encounter Bugs
- Code refactoring is required
- Adding more tests
- Open issues with the given template only.
- Feel free to label the issues appropriately.
- Do not remove the headings (questions in bold) while opening an issue with the given template. Simply append to it.
-
No commits must be made to the
master
branch directly. Themaster
branch shall only consist of the working code. -
Developers are expected to create new branches, and upon successful development and testing, a PR (pull request) must be opened to merge with master.
-
A branch must be named as either as the feature being implemented, or the issue being fixed.
✅ Examples of valid brach names:
- #8123 (issue number)
- OAuth (feature)
- questionsUtils (functionality of the questions)
❌ __Examples of invalid branch names:
- John
- TajMahal
- SomethingRandom
- Pizza
This code repository must strictly follow the below project structure and organisation :
|-/
|- /controllers
|- controller1.js (example file name)
|- controller2.ks
...
|- /middlewares
|- middlerware1.js (example file name)
|- middleware2.js
...
|- /routes
|- route1.js (example file name)
|- route2.js
...
|- /tests
|- test1.js (example file names)
|- test2.js
...
....
You can add more folders under
/
if required, as long as the files under it are organised semantically according to its functionality