Skip to content

Commit

Permalink
fix bug when commiting .png files on BitBucket
Browse files Browse the repository at this point in the history
  • Loading branch information
Mifi committed Apr 17, 2018
1 parent 6f7d287 commit 840867f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

## Master

* fix bug when commiting .png files on BitBucket [@Mifi][]

## 3.4.7

* Update dependencies [@orta][]
Expand Down Expand Up @@ -144,7 +146,7 @@
## 3.1.8

* Improvements to the Flow definition file. [@orta][]
* Improve path generator for danger-runner.
* Improve path generator for danger-runner. [@Mifi][]
* Update the PR DSL to include bots. [@orta][]

## 3.1.7
Expand Down Expand Up @@ -1039,7 +1041,7 @@ Not usable for others, only stubs of classes etc. - [@orta][]
[@hongrich]: https://github.com/hongrich
[@peterjgrainger]: https://github.com/peterjgrainger
[@azz]: https://github.com/azz
[@mifi]: https://github.com/ionutmiftode
[@Mifi]: https://github.com/ionutmiftode
[@sunshinejr]: https://github.com/sunshinejr
[@mxstbr]: https://github.com/mxstbr
[@happylinks]: https://github.com/happylinks
Expand Down
18 changes: 9 additions & 9 deletions source/platforms/bitbucket_server/BitBucketServerGit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ function bitBucketServerCommitToGitCommit(
},
committer: bbsCommit.committer
? {
email: bbsCommit.committer.emailAddress,
name: bbsCommit.committer.name,
date: new Date(bbsCommit.committerTimestamp).toISOString(),
}
email: bbsCommit.committer.emailAddress,
name: bbsCommit.committer.name,
date: new Date(bbsCommit.committerTimestamp).toISOString(),
}
: {
email: bbsCommit.author.emailAddress,
name: bbsCommit.author.name,
date: new Date(bbsCommit.authorTimestamp).toISOString(),
},
email: bbsCommit.author.emailAddress,
name: bbsCommit.author.name,
date: new Date(bbsCommit.authorTimestamp).toISOString(),
},
message: bbsCommit.message,
tree: null,
url,
Expand Down Expand Up @@ -101,7 +101,7 @@ const bitBucketServerDiffToGitStructuredDiff = (diffs: BitBucketServerDiff[]): G
return diffs.map(diff => ({
from: diff.source && diff.source.toString,
to: diff.destination && diff.destination.toString,
chunks: diff.hunks.map(hunk => ({
chunks: diff.hunks && diff.hunks.map(hunk => ({
changes: hunk.segments.map(segment => ({
type: segment.type === "ADDED" ? ("add" as "add") : ("del" as "del"),
content: segment.lines.map(({ line }) => line).join(EOL),
Expand Down

0 comments on commit 840867f

Please sign in to comment.