(collectionName: string, slug: string)
| 1022 | } |
| 1023 | |
| 1024 | async getStatuses(collectionName: string, slug: string) { |
| 1025 | const contentKey = generateContentKey(collectionName, slug); |
| 1026 | const branch = branchFromContentKey(contentKey); |
| 1027 | const mergeRequest = await this.getBranchMergeRequest(branch); |
| 1028 | const statuses: GitLabCommitStatus[] = await this.getMergeRequestStatues(mergeRequest, branch); |
| 1029 | return statuses.map(({ name, status, target_url }) => ({ |
| 1030 | context: name, |
| 1031 | state: status === GitLabCommitStatuses.Success ? PreviewState.Success : PreviewState.Other, |
| 1032 | target_url, |
| 1033 | })); |
| 1034 | } |
| 1035 | |
| 1036 | async getUnpublishedEntrySha(collection: string, slug: string) { |
| 1037 | const contentKey = generateContentKey(collection, slug); |
no test coverage detected