File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 uses : trufflesecurity/trufflehog@main
5252 with :
5353 path : ./
54- base : ${{ github.event.repository.default_branch }}
55- head : HEAD
54+ base : ${{ github.event_name == 'pull_request' && github. event.pull_request.base.sha || github.event.before }}
55+ head : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.event.after }}
5656 extra_args : --debug --only-verified
5757
5858 - name : Gitleaks
Original file line number Diff line number Diff line change 22
33# TODO: check for action lint
44# TODO: setup GOPATH locally
5- if ! [ -f " package.json" ]; then
5+ if ! [ -f " package.json" ]; then
66 go install github.com/rhysd/actionlint/cmd/actionlint@latest
77fi
88
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33# Package.json needs to be here or npm needs to run install
4- if ! [ -f " package.json" ]; then
4+ if ! [ -f " package.json" ]; then
55 pip install gitlint
66fi
77
8- # Run eslint
9- commitlint --edit $1
8+ # Run gitlint
9+ gitlint --staged --msg-filename " $1 "
Original file line number Diff line number Diff line change 33# TODO: Pull version from tags
44# TODO: Handle commitizen-branch hook
55# Package.json needs to be here or npm needs to run install
6- if ! [ -f " .cz.toml" || -f " cz.toml" ]; then
6+ if ! [ -f " .cz.toml" ] && ! [ -f " cz.toml" ]; then
77 pip install -U commitizen
8- cat .cz.toml << EOF
8+ cat > .cz.toml << EOF
99[tool.commitizen]
1010version = "0.1.0"
1111update_changelog_on_bump = true
1212EOF
1313 cz init
1414fi
1515
16- # Run eslint
17- cz check $1
16+ # Run commitizen
17+ cz check " $1 "
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33# Package.json needs to be here or npm needs to run install
4- if ! [ -f " package.json" ]; then
4+ if ! [ -f " package.json" ]; then
55 npm install --save-dev @commitlint/{cli,config-conventional}
66 # echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
77fi
88
9- # Run eslint
10- commitlint --edit $1
9+ # Run commitlint
10+ commitlint --edit " $1 "
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33# Package.json needs to be here or npm needs to run install
4- if ! [ -f " package.json" ]; then
4+ if ! [ -f " package.json" ]; then
55 pip install gitlint
66fi
77
8- # Run eslint
9- commitlint --edit $1
8+ # Run gitlint
9+ gitlint --staged --msg-filename " $1 "
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ ORIG_GOPATH=$GOPATH
55export GOPATH=$PWD
66
77# Install the binary
8- if ! [ command -v yamlfmt ] 2 > /dev/null; then
8+ if ! command -v yamlfmt > /dev/null 2>&1 ; then
99 go install github.com/google/yamlfmt/cmd/yamlfmt@latest
1010fi
1111
1212# Run yamlfmt
13- yamlfmt $1
13+ yamlfmt " $1 "
1414
1515# Cleanup
1616export GOPATH=$ORIG_GOPATH
Original file line number Diff line number Diff line change 11#! /usr/bin/env nix-shell
22#! nix-shell default.nix -A expEnv -i bash
3+ # shellcheck shell=bash
34
45nix-build " $@ "
Original file line number Diff line number Diff line change 11#! /usr/bin/env nix-shell
22#! nix-shell default.nix -A expEnv -i bash
3+ # shellcheck shell=bash
34
45# TODO: pull the commit-msg from upstream
56# TODO: commitlint the commit-msg
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ if [ -f ".csslintrc" ]; then
66fi
77
88npm install -g csslint
9- csslint $1
9+ csslint " $1 "
You can’t perform that action at this time.
0 commit comments