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