(collectionName: string, slug: string)
| 805 | } |
| 806 | |
| 807 | async getStatuses(collectionName: string, slug: string) { |
| 808 | const contentKey = generateContentKey(collectionName, slug); |
| 809 | const branch = branchFromContentKey(contentKey); |
| 810 | const pullRequest = await this.getBranchPullRequest(branch); |
| 811 | const statuses = await this.getPullRequestStatuses(pullRequest); |
| 812 | |
| 813 | return statuses.map(({ key, state, url }) => ({ |
| 814 | context: key, |
| 815 | state: |
| 816 | state === BitBucketPullRequestStatusState.Successful |
| 817 | ? PreviewState.Success |
| 818 | : PreviewState.Other, |
| 819 | target_url: url, |
| 820 | })); |
| 821 | } |
| 822 | |
| 823 | async getUnpublishedEntrySha(collection: string, slug: string) { |
| 824 | const contentKey = generateContentKey(collection, slug); |
no test coverage detected