(
title: string,
head: string,
body: string = DEFAULT_PR_BODY,
)
| 670 | } |
| 671 | |
| 672 | async createPR( |
| 673 | title: string, |
| 674 | head: string, |
| 675 | body: string = DEFAULT_PR_BODY, |
| 676 | ): Promise<ForgejoPullRequest> { |
| 677 | return this.request(`${this.originRepoURL}/pulls`, { |
| 678 | method: 'POST', |
| 679 | body: JSON.stringify({ |
| 680 | title, |
| 681 | head: await this.getHeadReference(head), |
| 682 | base: this.branch, |
| 683 | body, |
| 684 | }), |
| 685 | }); |
| 686 | } |
| 687 | |
| 688 | async updatePR(number: number, state: 'open' | 'closed'): Promise<ForgejoPullRequest> { |
| 689 | return this.request(`${this.originRepoURL}/pulls/${number}`, { |
no test coverage detected