From 5519d02f609a87b0ca47a8e82c116811005b6277 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Mon, 3 Oct 2016 20:40:03 -0400 Subject: [docs] revamp bitmask dev docs --- docs/hooks/leap-autopep8.post-commit.hook | 15 +++++++++ docs/hooks/leap-autopep8.post-commit.hook.ADD | 2 ++ docs/hooks/leap-commit-template | 7 ++++ docs/hooks/leap-commit-template.README | 47 +++++++++++++++++++++++++++ docs/hooks/leap-flake8.pre-commit.hook | 7 ++++ 5 files changed, 78 insertions(+) create mode 100755 docs/hooks/leap-autopep8.post-commit.hook create mode 100755 docs/hooks/leap-autopep8.post-commit.hook.ADD create mode 100644 docs/hooks/leap-commit-template create mode 100644 docs/hooks/leap-commit-template.README create mode 100755 docs/hooks/leap-flake8.pre-commit.hook (limited to 'docs/hooks') diff --git a/docs/hooks/leap-autopep8.post-commit.hook b/docs/hooks/leap-autopep8.post-commit.hook new file mode 100755 index 0000000..cffb1d5 --- /dev/null +++ b/docs/hooks/leap-autopep8.post-commit.hook @@ -0,0 +1,15 @@ +#!/bin/sh + +# Auto pep8 correction as a post-commit hook. +# Thanks to http://victorlin.me/posts/2014/02/05/auto-post-commit-pep8-correction + +echo "[+] running autopep8..." +FILES=$(git diff HEAD^ HEAD --name-only --diff-filter=ACM | grep -e '\.py$') + +for f in $FILES +do + # auto pep8 correction + autopep8 --in-place $f +done + +git status diff --git a/docs/hooks/leap-autopep8.post-commit.hook.ADD b/docs/hooks/leap-autopep8.post-commit.hook.ADD new file mode 100755 index 0000000..b6e07ae --- /dev/null +++ b/docs/hooks/leap-autopep8.post-commit.hook.ADD @@ -0,0 +1,2 @@ + #!/bin/sh + cd .git/hooks && ln -s ../../docs/leap-autopep8.post-commit.hook post-commit diff --git a/docs/hooks/leap-commit-template b/docs/hooks/leap-commit-template new file mode 100644 index 0000000..8a5c7cd --- /dev/null +++ b/docs/hooks/leap-commit-template @@ -0,0 +1,7 @@ +[bug|feat|docs|style|refactor|test|pkg|i18n] ... +... + +- Resolves: #XYZ +- Related: #XYZ +- Documentation: #XYZ +- Releases: XYZ diff --git a/docs/hooks/leap-commit-template.README b/docs/hooks/leap-commit-template.README new file mode 100644 index 0000000..ce8809e --- /dev/null +++ b/docs/hooks/leap-commit-template.README @@ -0,0 +1,47 @@ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +HOW TO USE THIS TEMPLATE: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Run `git config commit.template docs/leap-commit-template` or +edit the .git/config for this project and add +`template = docs/leap-commit-template` +under the [commit] block + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +COMMIT TEMPLATE FORMAT EXPLAINED +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[type] + + +