-
{:x => y}
->{x: y}
Find Replace Comment :(\w+) =>
\1:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# this hook aborts commits which contain invalid puppet syntax | |
errors=0 | |
# get all files in commit, use awk to get file name only, use grep to get puppet files only | |
files=$(git diff --cached --name-status | awk '$1 != "D" { print $2 }' | grep "\.pp") | |
# if you are committing .pp files | |
if [[ "$files" ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# this hook aborts commits which do not include a link to trello | |
INPUT_FILE=$1 | |
START_LINE=`head -n1 $INPUT_FILE` | |
PATTERN="https:\/\/trello\.com\/" | |
if ! [[ "$START_LINE" =~ $PATTERN ]]; then | |
echo "Commit messages should include a link to the related trello card." | |
echo "To override this check add the --no-verify flag " | |
exit 1 |
NewerOlder