Change getChangeDate call
Use the v2.0 commit resource instead of the v1.0 changeset resource.pull/6094/head
parent
bea4ec7f88
commit
046b1184dc
|
@ -205,11 +205,15 @@ abstract class BitbucketDriver extends VcsDriver
|
||||||
return $this->fallbackDriver->getChangeDate($identifier);
|
return $this->fallbackDriver->getChangeDate($identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
$resource = $this->getScheme() . '://api.bitbucket.org/1.0/repositories/'
|
$resource = sprintf(
|
||||||
. $this->owner . '/' . $this->repository . '/changesets/' . $identifier;
|
'https://api.bitbucket.org/2.0/repositories/%s/%s/commit/%s?fields=date',
|
||||||
$changeset = JsonFile::parseJson($this->getContentsWithOAuthCredentials($resource), $resource);
|
$this->owner,
|
||||||
|
$this->repository,
|
||||||
|
$identifier
|
||||||
|
);
|
||||||
|
$commit = JsonFile::parseJson($this->getContentsWithOAuthCredentials($resource), $resource);
|
||||||
|
|
||||||
return new \DateTime($changeset['timestamp']);
|
return new \DateTime($commit['date']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue