-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitDSL: Diffs for added and removed files #368
Comments
Yeah, I think this behaviour is a great call 👍 - I think your expectations there are what I'd imagine too |
bdotdub
added a commit
to bdotdub/danger-js
that referenced
this issue
Sep 7, 2017
3 tasks
bdotdub
added a commit
to bdotdub/danger-js
that referenced
this issue
Sep 7, 2017
bdotdub
added a commit
to bdotdub/danger-js
that referenced
this issue
Sep 7, 2017
bdotdub
added a commit
to bdotdub/danger-js
that referenced
this issue
Sep 8, 2017
bdotdub
added a commit
to bdotdub/danger-js
that referenced
this issue
Sep 8, 2017
bdotdub
added a commit
to bdotdub/danger-js
that referenced
this issue
Sep 8, 2017
bdotdub
added a commit
to bdotdub/danger-js
that referenced
this issue
Sep 8, 2017
This is in 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Calling
diffForFile
unexpectedly returnednull
for me for a file that was added. It looks like expected behavior per these lines:danger-js/source/platforms/github/GitHubGit.ts
Line 50 in 72b7c6c
danger-js/source/platforms/github/GitHubGit.ts
Line 150 in 72b7c6c
It was initially unclear to me why
diffForFile
would strictly return the diffs for modified files only. I can understand why we would want this conceptually (diffs are a byproduct of a change of a file), but there is definitely utility in being able to get a diff for created and removed files.I'd like to propose that
diffForFile
return aTextDiff
object for added & removed files. For added files,added
will be the whole file and removed would be empty, and vice versa for removed files.It would make getting all changes in the whole PR much easier, rather than calling diff on some, and
fileContents
on others:(The above code also isn't working for me because of #367)
This change would extend to
JSONDiffForFile
andJSONPatchForFile
.Barring that, the documentation should be more explicit in communicating this.
Happy to do the work but wanted to get some thoughts!
The text was updated successfully, but these errors were encountered: