feat(backend-gitgateway): improve deploy preview visibility (#3882)

This commit is contained in:
Erez Rokah
2020-06-09 20:33:16 +03:00
committed by GitHub
parent da7fbe0638
commit afc9bf4f3f
4 changed files with 55 additions and 2 deletions

View File

@ -1473,4 +1473,11 @@ export default class API {
);
return result;
}
async getUnpublishedEntrySha(collection: string, slug: string) {
const contentKey = this.generateContentKey(collection, slug);
const branch = branchFromContentKey(contentKey);
const pullRequest = await this.getBranchPullRequest(branch);
return pullRequest.head.sha;
}
}