Remove use of deprecated, undocumented context vars and invalid BB API URL.

Merged
#47 · Created  · Last updated

Merged pull request

Merged in erik/remove_deprecated_vars (pull request #47)

1fd7804·Author: ·Closed by: ·2018-06-01

Description

Bitbucket has long deprecated the use of the 1.0 API, which this template uses as example. This updates that to 2.0.

This template also used an invalid, deprecated and unsupported way to access the Bitbucket Cloud API by constructing URLs in the form of: https://bitbucket.org/api/.... This is invalid and illegal and works only for undocumented backwards compatibility reasons.

The only location for the Bitbucket API is: https://api.bitbucket.org as per its documentation.

Furthermore, this template was using deprecated and unsupported module names. E.g. repoPage (singular), while the only supported version is repoPages (plural). Note these illegal forms prevented any generated addon code from getting past the automated Atlassian Marketplace validation.

Lastly, this pr drops the use of the deprecated and now undocumented flat context variables. Bitbucket uses complex resource objects that can be traversed in context variables (e.g., instead of branch_resolved_hash, the correct variable is branch.target.hash as per Bitbucket's JSON Schema).

0 attachments

0 comments

Loading commits...