You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I investigate a bit more and here what I came to.
The whole git diff was a bit... reverted. What do I mean? git.changedLines.diff didn't show anything because baseSha and headSha should be swapped.
To demonstrate current behaviour I've opened MR in my danger/kotlin fork: grine4ka#3.
As you can see git.changedLines.diff shows additions and deletions reverted. Compare it with GitHub's Files Changed tab.
@IvanSanchez-uam BTW, if you use GitHub you should change fetch-depth to your checkout github action. Because by default it checks out a shallow clone with no history in it. So some commits are not visible on CI.
grine4ka
added a commit
to grine4ka/kotlin
that referenced
this issue
Dec 11, 2024
- Fix getting `baseSha` and `headSha`. Now I get `baseSha` from first commit, and `headSha` is got from the last commit. Need to sort commits by author date to be ordered chronologically
- Reverted `baseSha` and `headSha` when computing `git diff`
- Due to swapping `baseSha` and `headSha` also swapped additions and deletions in computation lambdas
Closesdanger#250
I have these lines in my Danger.df.kts file
in my case I want to get the diff but when calling
changedLines
extension function just give meAdditions = 0
Deletions = 0
Diff = null
is this extension function really working?, is there another way to get the diff?
I also tried to use the github.pullRequest but there is no a diff value here.
I have the feeling that these lines are not working
The text was updated successfully, but these errors were encountered: