Skip to content

Commit dd0b192

Browse files
committed
Merge remote-tracking branch 'upstream/master' into upstream__master
syncs with latest changes of https://github.com/awslabs/git-secrets
2 parents a79dbf2 + 5357e18 commit dd0b192

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

.github/workflows/test.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: "test"
3+
4+
on:
5+
push:
6+
branches:
7+
- 'master'
8+
pull_request: {}
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- run: make test

git-secrets

+3-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ prepare_commit_msg_hook() {
213213

214214
install_hook() {
215215
local path="$1" hook="$2" cmd="$3" dest
216-
# Determines the approriate path for a hook to be installed
216+
# Determines the appropriate path for a hook to be installed
217217
if [ -d "${path}/hooks/${hook}.d" ]; then
218218
dest="${path}/hooks/${hook}.d/git-secrets"
219219
else
@@ -224,7 +224,8 @@ install_hook() {
224224
echo "#!/usr/bin/env bash" > "${dest}"
225225
echo "git secrets --${cmd} -- \"\$@\"" >> "${dest}"
226226
chmod +x "${dest}"
227-
say "$(tput setaf 2)$(tput sgr 0) Installed ${hook} hook to ${dest}"
227+
[ -t 1 ] && command -v tput &> /dev/null && echo -n "$(tput setaf 2)$(tput sgr 0) "
228+
echo "Installed ${hook} hook to ${dest}"
228229
}
229230

230231
install_all_hooks() {

test/test_helper.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ setup_repo() {
3030
delete_repo
3131
mkdir -p $TEST_REPO
3232
cd $TEST_REPO
33-
git init
33+
git init --initial-branch=master
3434
git config --local --add secrets.patterns '@todo'
3535
git config --local --add secrets.patterns 'forbidden|me'
3636
git config --local --add secrets.patterns 'WHITE SPACE'

0 commit comments

Comments
 (0)