(collectionName: string, slug: string)
| 1013 | } |
| 1014 | |
| 1015 | async getStatuses(collectionName: string, slug: string) { |
| 1016 | const contentKey = generateContentKey(collectionName, slug); |
| 1017 | const branch = branchFromContentKey(contentKey); |
| 1018 | const mergeRequest = await this.getBranchMergeRequest(branch); |
| 1019 | const statuses: GitLabCommitStatus[] = await this.getMergeRequestStatues(mergeRequest, branch); |
| 1020 | return statuses.map(({ name, status, target_url }) => ({ |
| 1021 | context: name, |
| 1022 | state: status === GitLabCommitStatuses.Success ? PreviewState.Success : PreviewState.Other, |
| 1023 | target_url, |
| 1024 | })); |
| 1025 | } |
| 1026 | |
| 1027 | async getUnpublishedEntrySha(collection: string, slug: string) { |
| 1028 | const contentKey = generateContentKey(collection, slug); |
no test coverage detected