(collectionName: string, slug: string)
| 822 | } |
| 823 | |
| 824 | async getStatuses(collectionName: string, slug: string) { |
| 825 | const contentKey = generateContentKey(collectionName, slug); |
| 826 | const branch = branchFromContentKey(contentKey); |
| 827 | const pullRequest = await this.getBranchPullRequest(branch); |
| 828 | const statuses = await this.getPullRequestStatuses(pullRequest); |
| 829 | |
| 830 | return statuses.map(({ key, state, url }) => ({ |
| 831 | context: key, |
| 832 | state: |
| 833 | state === BitBucketPullRequestStatusState.Successful |
| 834 | ? PreviewState.Success |
| 835 | : PreviewState.Other, |
| 836 | target_url: url, |
| 837 | })); |
| 838 | } |
| 839 | |
| 840 | async getUnpublishedEntrySha(collection: string, slug: string) { |
| 841 | const contentKey = generateContentKey(collection, slug); |
no test coverage detected