(path: string, branch: string)
| 614 | } |
| 615 | |
| 616 | async isFileExists(path: string, branch: string) { |
| 617 | try { |
| 618 | await this.requestText({ |
| 619 | url: `${this.endpointUrl}/items/`, |
| 620 | params: { version: branch, path }, |
| 621 | cache: 'no-store', |
| 622 | }); |
| 623 | return true; |
| 624 | } catch (error) { |
| 625 | if (error instanceof APIError && error.status === 404) { |
| 626 | return false; |
| 627 | } |
| 628 | throw error; |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | async createPullRequest(branch: string, commitMessage: string, status: string) { |
| 633 | const pr = { |