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

@ -850,4 +850,11 @@ export default class API {
target_url,
}));
}
async getUnpublishedEntrySha(collection: string, slug: string) {
const contentKey = generateContentKey(collection, slug);
const branch = branchFromContentKey(contentKey);
const mergeRequest = await this.getBranchMergeRequest(branch);
return mergeRequest.sha;
}
}