Closed
Description
Describe the bug
Since version 12.0.1
, all changes (including deletions, creations, and modifications) are incorrectly grouped under modified_files
. The created_files
and deleted_files
arrays remain empty, even when there are clearly file creations or deletions.
To Reproduce
Steps to reproduce the behavior:
- On version
11.3.1
, create adangerfile.ts
as follows:
import { danger} from "danger"
console.log("Created", danger.git.created_files)
console.log("Deleted", danger.git.deleted_files)
console.log("Modified", danger.git.modified_files)
- Run the command
npx danger pr https://github.com/danger/danger-js/pull/9
. - Observe the expected output:
Starting Danger PR on danger/danger-js#9
Created [ 'yarn.lock' ]
Deleted [ 'npm-shrinkwrap.json' ]
Modified [ 'README.md', 'package.json' ]
Danger: ✓ passed review, received no feedback.
- Update the version to
12.0.1
- Run the same command:
npx danger pr https://github.com/danger/danger-js/pull/9
- Notice the unexpected and incorrect output:
Starting Danger PR on danger/danger-js#9
Created []
Deleted []
Modified [ 'README.md', 'npm-shrinkwrap.json', 'package.json', 'yarn.lock' ]
Danger: ✓ passed review, received no feedback.
Expected behavior
I would expect the behavior to remain consistent with version 11.3.1
, where deletions are grouped in deleted_files
, creations in created_files
, etc.
Your Environment
software | version |
---|---|
danger.js | 12.0.1 , 12.1.0 & 12.2.0 |
node | v20.12.1 & v18.20.2 |
npm | 10.5.0 |
Operating System | MacOS Sonoma 14.4.1 |
Activity