Skip to content
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

Fix working with raw git diff #297

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

grine4ka
Copy link

The main problem is described in #250. Here what I made and why:

  1. 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, because differents APIs return commits in different order. For example, based on quote from GitHub documentation: API returns commits in chronological order, but GitLab API says that the commits are shown in reverse chronological order.
  2. Reverted baseSha and headSha when computing git diff in KtxGit file, because order of the commits matters on how diff is shown (additions and deletions are swapped)
  3. Due to swapping baseSha and headSha also swapped additions and deletions in computation lambdas

Closes #250

- 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

Closes danger#250
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Git.changedLines returns empty values for PullRequestChangedLines object
2 participants