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

@ -771,4 +771,11 @@ export default class API {
target_url: url,
}));
}
async getUnpublishedEntrySha(collection: string, slug: string) {
const contentKey = generateContentKey(collection, slug);
const branch = branchFromContentKey(contentKey);
const pullRequest = await this.getBranchPullRequest(branch);
return pullRequest.destination.commit.hash;
}
}