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