MCPcopy Create free account
hub / github.com/decaporg/decap-cms / getDifferences

Method getDifferences

packages/decap-cms-backend-forgejo/src/API.ts:723–739  ·  view source on GitHub ↗
(from: string, to: string)

Source from the content-addressed store, hash-verified

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`, {

Callers 3

API.spec.jsFile · 0.45

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected