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

Method getDifferences

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

Source from the content-addressed store, hash-verified

714 }
715
716 async getDifferences(from: string, to: string): Promise<ForgejoCompareResponse> {
717 // For OA, try the fork repo first, then fall back to origin
718 const repoURL = this.useOpenAuthoring ? this.repoURL : this.originRepoURL;
719 try {
720 return await this.request(
721 `${repoURL}/compare/${encodeURIComponent(from)}...${encodeURIComponent(to)}`,
722 );
723 } catch (e) {
724 if (this.useOpenAuthoring) {
725 // Retry with origin repo
726 return this.request(
727 `${this.originRepoURL}/compare/${encodeURIComponent(from)}...${encodeURIComponent(to)}`,
728 );
729 }
730 throw e;
731 }
732 }
733
734 async updatePullRequestLabels(number: number, labels: number[]): Promise<ForgejoLabel[]> {
735 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