-
-
Notifications
You must be signed in to change notification settings - Fork 362
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
danger local should consider uncommitted changes #972
Comments
Yeah, I use it as a git commit hook - I'm open to a flag or to do some audits to decide if you want staged instead |
I think there was an initial implementation of it, but was not finished https://github.com/danger/danger-js/blob/master/source/commands/danger-local.ts#L14 |
I think that getting staged and unstaged filed is fairly easy, we just need to run For untracked files, we would need to change the way the list of created files are computed. Currently they are only obtained from the diff. However, given that there's no diff for those files they will never be there, and we would need to use Also, I'm not sure what the implications would be if we add this unstaged or untracked files. as WDYT? |
I think it is probably worth faking the diff for the new files before it goes into the DSL generation, so that code can be consistent with |
@orta Did you mean when run |
No, I wanted it for the diff to master - so you can run danger locally before pushing your PRs https://github.com/danger/danger-js/blob/master/package.json#L74 |
I'm a little confused on your comment. You mean we should add the uncommitted diff in current function. danger-js/source/platforms/LocalGit.ts Line 47 in 9ffa89a
|
* details in danger#972
I have sent a pull request about this issue. I am not sure this solution is the way you want. @orta |
* details in danger#972
danger local
only computes the differences between commits and does not consider changes not yet committed.If I modify a file, I'd like to be able to locally check it before committing it, so that my local commits are compliant.
The text was updated successfully, but these errors were encountered: