This file contains 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/bash | |
path=$(mktemp -d) | |
risk=$RISK_SCORE | |
if ! [ $WEBHOOK_URL ] | |
then | |
echo "You need to provide a WEBHOOK_URL." | |
exit 1 | |
fi |
This file contains 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 | |
# A git pre-commit hook that verifies that the change does not introduce | |
# the use of a Jasmine exclusive test via 'iit(..)' or 'ddescribe(..)', which would | |
# prevent most other tests from being run without any clear indication thereof | |
# Redirect output to stderr. | |
exec 1>&2 | |
ADDED_EXCLUSIVE_TEST=$(git diff -U0 --staged -S"(\W|^)(ddescribe|iit))\s+?\(" --pickaxe-regex | egrep "(^\+.*(ddescribe|iit))|\+{3}") |
This file contains 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
_.each(test,function(sobjects){ sfdc.describe(sobjects.name, function(sfObjectDescription){ | |
var allSearchableSFObjectFields = []; | |
for (var i = 0; i < sfObjectDescription.fields.length; i++) { | |
if (sfObjectDescription.fields[i].nameField) | |
allSearchableSFObjectFields.push(sfObjectDescription.fields[i].name); | |
}; | |
if (allSearchableSFObjectFields.length > 0 && allSearchableSFObjectFields[0]!="Name") | |
console.log(sfObjectDescription.name + ' namefields :'+JSON.stringify(allSearchableSFObjectFields.join(','))) |