Skip to content

Commit

Permalink
Review git hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Chatewgne committed May 24, 2022
1 parent 85ed47c commit 7132b43
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .githooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')

if [ $protected_branch = $current_branch ]
then
read -p "You're about to push to 'master', is that what you intended? [y|n] " -n 1 -r < /dev/tty
read -p "You're about to push to '$protected_branch', is that what you intended? [y|n] " -n 1 -r < /dev/tty
echo
if echo $REPLY | grep -E '^[Yy]$' > /dev/null
then
Expand Down
2 changes: 1 addition & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CHANGELOG

**Maintenance**

- Add a git hook to prevent pushing to master. To enable it, developpers should run the following command from root directory : `ln -s -f ../../.githooks/pre-push .git/hooks/pre-push`
- Add a git hook to prevent pushing to master.
- Update to paperclip 2.5.0


Expand Down
2 changes: 1 addition & 1 deletion docs/contribute/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Conventions
* KISS & DRY as much as possible
* Elegant and generic is good, simple is better
* Commits messages are explicit and mention issue number (``(ref #12)`` or ``(fixes #23)``)
* Features are developed in a branch and merged from Github pull-requests.
* Features are developed in a branch and merged from Github pull-requests. A git hook to is available to prevent pushing to master, to enable it, developpers should run the following command from root directory (`Geotrek-admin/`) : `ln -s -f ../../.githooks/pre-push .git/hooks/pre-push`


Definition of done
Expand Down

0 comments on commit 7132b43

Please sign in to comment.