code: 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;
    }
  }
docs: Return the commit SHA for a branch