lib/platform/bitbucket/index.js
async function getBranchCommit(branchName) {
  try {
    const branch = (await api.get(
      `/2.0/repositories/${config.repository}/refs/branches/${branchName}`
    )).body;
    return branch.target.hash;
  } catch (err) /* istanbul ignore next */ {
    logger.debug({ err }, `getBranchCommit('${branchName}') failed'`);
    return null;
  }
}
async function getBranchCommit(branchName) {
  try {
    const branch = (await api.get(
      `/2.0/repositories/${config.repository}/refs/branches/${branchName}`
    )).body;
    return branch.target.hash;
  } catch (err) /* istanbul ignore next */ {
    logger.debug({ err }, `getBranchCommit('${branchName}') failed'`);
    return null;
  }
}
async function getBranchCommit ( branchName ) { try { const branch = ( await api . get ( ` ${ config . repository } ${ branchName } ` ) ) . body ; return branch . target . hash ; } catch ( err ) /* istanbul ignore next */ { logger . debug ( { err } , ` ${ branchName } ` ) ; return null ; } }
Return the commit SHA for a branch
Return the commit SHA for a branch