check-if-folder-contents-changed-in-git-commit-range
In the current working directory, tells you if any matching files have changed between two commits.
Useable from node or the command-line.
Accepts github range URLs, so you can use CIRCLE_COMPARE_URL
:
check-
CLI
You can install with npm i -g check-if-folder-contents-changed-in-git-commit-range
.
When you install from npm, it is aliased to cifccigcr
and folder-contents-changed-in-git-commit-range
for usability.
Takes two unnamed arguments: a glob pattern, and a git commit range.
cifccigcr test-fixture/*.txt ce31bd9...3a891ef6
The git commit range can be either a Github comparison url, like https://github.com/TehShrike/check-if-folder-contents-changed-in-git-commit-range/compare/ce31bd9...3a891ef6
, or just two hashes separated by three periods, like ce31bd9...3a891ef6
.
The glob pattern is parsed with minimatch.
Any other named arguments that are passed in are passed to minimatch. (mri is used for cli argument parsing.)
node
This module exports a single function that returns true
if any files matching the glob were changed in the commit range, false
otherwise.
folderContentsChanged(globPattern, gitRangeString[, globOptions])
const folderContentsChanged = const globPattern = `test-fixture/**/*.txt`const gitRangeString = `ce31bd9...3a891ef6`const fileChanged =
As with the CLI version, the git range string may be a Github comparison URL.