danger / danger-js

⚠️ Stop saying "you forgot to …" in code review
http://danger.systems/js/
MIT License
5.26k stars 368 forks source link

Fix `fileMatch` to not return committed or working-dir files when using `--staging` #1305

Closed lode closed 2 years ago

lode commented 2 years ago

Changes git diff <base> to git diff --staged. The first one also returns changes from base to working-dir, and thus includes working-dir and committed files. The second only returns changes in the staging area.

Currently, this actually only fixes the file paths, which is one of the issues in https://github.com/danger/danger-js/issues/1304. It doesn't fix the diffs yet. See https://github.com/danger/danger-js/issues/1304 for more details.

orta commented 2 years ago

Thanks!