build(deps): bump github.com/vbatts/git-validation in /test/tools

Bumps [github.com/vbatts/git-validation](https://github.com/vbatts/git-validation) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/vbatts/git-validation/releases)
- [Commits](https://github.com/vbatts/git-validation/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/vbatts/git-validation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2023-03-15 13:00:58 +00:00
committed by GitHub
parent 68bf49799d
commit 2b4a27719c
64 changed files with 24001 additions and 294 deletions

View File

@ -22,6 +22,7 @@ var (
flDebug = flag.Bool("D", false, "debug output")
flQuiet = flag.Bool("q", false, "less output")
flDir = flag.String("d", ".", "git directory to validate from")
flNoGithub = flag.Bool("no-github", false, "disables Github Actions environment checks (when env GITHUB_ACTIONS=true is set)")
flNoTravis = flag.Bool("no-travis", false, "disables travis environment checks (when env TRAVIS=true is set)")
flTravisPROnly = flag.Bool("travis-pr-only", true, "when on travis, only run validations if the CI-Build is checking pull-request build")
)
@ -73,6 +74,10 @@ func main() {
commitRange = os.Getenv("TRAVIS_COMMIT")
}
}
// https://docs.github.com/en/actions/reference/environment-variables
if strings.ToLower(os.Getenv("GITHUB_ACTIONS")) == "true" && !*flNoGithub {
commitRange = fmt.Sprintf("%s..%s", os.Getenv("GITHUB_SHA"), "HEAD")
}
}
runner, err := validate.NewRunner(*flDir, rules, commitRange, *flVerbose)