(from: string, to: string)
| 721 | } |
| 722 | |
| 723 | async getDifferences(from: string, to: string): Promise<ForgejoCompareResponse> { |
| 724 | // For OA, try the fork repo first, then fall back to origin |
| 725 | const repoURL = this.useOpenAuthoring ? this.repoURL : this.originRepoURL; |
| 726 | try { |
| 727 | return await this.request( |
| 728 | `${repoURL}/compare/${encodeURIComponent(from)}...${encodeURIComponent(to)}`, |
| 729 | ); |
| 730 | } catch (e) { |
| 731 | if (this.useOpenAuthoring) { |
| 732 | // Retry with origin repo |
| 733 | return this.request( |
| 734 | `${this.originRepoURL}/compare/${encodeURIComponent(from)}...${encodeURIComponent(to)}`, |
| 735 | ); |
| 736 | } |
| 737 | throw e; |
| 738 | } |
| 739 | } |
| 740 | |
| 741 | async updatePullRequestLabels(number: number, labels: number[]): Promise<ForgejoLabel[]> { |
| 742 | return this.request(`${this.originRepoURL}/issues/${number}/labels`, { |
no test coverage detected