(paths: string[], comment: string)
| 573 | } |
| 574 | |
| 575 | async deleteFiles(paths: string[], comment: string) { |
| 576 | const ref = await this.getRef(this.branch); |
| 577 | const refUpdate = { |
| 578 | name: ref.name, |
| 579 | oldObjectId: ref.objectId, |
| 580 | }; |
| 581 | |
| 582 | const changes = paths.map(path => |
| 583 | getChangeItem({ action: AzureCommitChangeType.DELETE, path }), |
| 584 | ); |
| 585 | const commits = [{ comment, changes }]; |
| 586 | const push = { |
| 587 | refUpdates: [refUpdate], |
| 588 | commits, |
| 589 | }; |
| 590 | |
| 591 | return this.requestJSON({ |
| 592 | url: `${this.endpointUrl}/pushes`, |
| 593 | method: 'POST', |
| 594 | body: JSON.stringify(push), |
| 595 | }); |
| 596 | } |
| 597 | |
| 598 | async getPullRequests(sourceBranch?: string) { |
| 599 | const { value: pullRequests } = await this.requestJSON<AzureArray<AzurePullRequest>>({ |
no test coverage detected