async function getPrPackageVersion()

in on-merge/util.js [9:19]


async function getPrPackageVersion(github, repoOwner, repoName, ref) {
    const { data } = await github.repos.getContent({
        owner: repoOwner,
        repo: repoName,
        ref: ref,
        path: 'package.json',
    });
    const json = Buffer.from(data.content, 'base64').toString();
    const { version } = JSON.parse(json);
    return version;
}