(opts = {})
| 147 | } |
| 148 | |
| 149 | async commitPrs(opts = {}) { |
| 150 | const { commitSha, state = 'open' } = opts; |
| 151 | const { repos } = octokit(this.token, this.repo); |
| 152 | |
| 153 | return ( |
| 154 | await repos.listPullRequestsAssociatedWithCommit({ |
| 155 | ...ownerRepo({ uri: this.repo }), |
| 156 | commit_sha: commitSha, |
| 157 | state |
| 158 | }) |
| 159 | ).data.map((pr) => { |
| 160 | const { |
| 161 | html_url: url, |
| 162 | head: { ref: source }, |
| 163 | base: { ref: target } |
| 164 | } = pr; |
| 165 | return { |
| 166 | url, |
| 167 | source: branchName(source), |
| 168 | target: branchName(target) |
| 169 | }; |
| 170 | }); |
| 171 | } |
| 172 | |
| 173 | async checkCreate(opts = {}) { |
| 174 | const { |
nothing calls this directly
no test coverage detected