From 220ecb199b5a12b8845d14c9099ee5c015e009ad Mon Sep 17 00:00:00 2001 From: Nabarun Pal Date: Sat, 6 Jun 2020 19:57:02 +0530 Subject: [PATCH 1/2] Add commit message guidelines Signed-off-by: Nabarun Pal --- .github/CONTRIBUTING.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/CONTRIBUTING.rst b/.github/CONTRIBUTING.rst index 9738b711..a75b9b19 100644 --- a/.github/CONTRIBUTING.rst +++ b/.github/CONTRIBUTING.rst @@ -42,6 +42,23 @@ If you do make any changes to models (modification or addition), make sure to run ``python manage.py makemigrations`` to enable the server to migrate existing data to the new models. +Commit Guidelines +----------------- + +It is advised to care of the following while committing any change: + +1. Separate subject from body with a blank line +2. Limit the subject line to 50 characters +3. Capitalize the subject line +4. Do not end the subject line with a period +5. Use the imperative mood in the subject line +6. Wrap the body at 72 characters +7. Use the body to explain what and why vs. how + +Do note that the above are meant to be guidelines and not lines set in stone. + +Source and Credits: `How to Write a Git Commit Message`_ by Chris Beam. + Code Convention --------------- @@ -49,5 +66,6 @@ We follow the `Black Coding Style`_, and sort our imports with `isort`_. This code style is enforced with automation. .. _`issue tracker`: https://github.com/pythonindia/junction/issues +.. _`How to Write a Git Commit Message`: https://chris.beams.io/posts/git-commit/ .. _`isort`: https://isort.readthedocs.org/en/latest/ .. _`Black Coding Style`: https://black.readthedocs.io/en/latest/the_black_code_style.html From 437556dfe573131d752fe40200586c7dfdd436a2 Mon Sep 17 00:00:00 2001 From: Nabarun Pal Date: Sat, 6 Jun 2020 19:57:25 +0530 Subject: [PATCH 2/2] Fix incorrect link to contribution guidelines in README Signed-off-by: Nabarun Pal --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f4a2fb5..5a9adffb 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Contributing [issue-list]: https://github.com/pythonindia/junction/issues/ [new-issue]: https://github.com/pythonindia/junction/issues/new -[guidelines]: https://github.com/pythonindia/junction/blob/master/.github/CONTRIBUTING.md +[guidelines]: https://github.com/pythonindia/junction/blob/master/.github/CONTRIBUTING.rst [getting-started]: https://in-junction.readthedocs.io/en/latest/development/getting-started.html License