Skip to content

Commit

Permalink
For getting a diff from the Bitbucket Server API it seems the from
Browse files Browse the repository at this point in the history
…and `to` commit hashes were switched
  • Loading branch information
osmestad committed Jun 6, 2019
1 parent a1db4c6 commit 259d076
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/platforms/bitbucket_server/BitBucketServerAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class BitBucketServerAPI {

getStructuredDiffForFile = async (base: string, head: string, filename: string): Promise<BitBucketServerDiff[]> => {
const { repoSlug } = this.repoMetadata
const path = `rest/api/1.0/${repoSlug}/compare/diff/${filename}?withComments=false&from=${base}&to=${head}`
const path = `rest/api/1.0/${repoSlug}/compare/diff/${filename}?withComments=false&from=${head}&to=${base}`
const res = await this.get(path)
throwIfNotOk(res)
return (await res.json()).diffs
Expand Down

0 comments on commit 259d076

Please sign in to comment.