danger / danger-js

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

Bug Fix: Properly group files into `created`, `modified`, `deleted`. #1451

Closed szweier closed 5 months ago

szweier commented 6 months ago

Attempt to fix https://github.com/danger/danger-js/issues/1446

By adding the file mode to the file patch the output from parseDiff now includes new and deleted boolean values correctly and give us something to validate against in diffToGitJSONDSL.

New Output:

Starting Danger PR on danger/danger-js#9
Created [ 'yarn.lock' ]

Deleted [ 'npm-shrinkwrap.json' ]
Modified [ 'README.md', 'package.json' ]
orta commented 5 months ago

I'm a little surprised this doesn't change any tests - but seems like the right thing to me