danger / danger-js

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

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

Closed szweier closed 1 month ago

szweier commented 1 month 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 1 month ago

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