(commit, github)
| 12 | const prNumberRegex = /\(#([-0-9]+)\)$/ |
| 13 | |
| 14 | const getCommitPullRequest = async (commit, github) => { |
| 15 | const match = prNumberRegex.exec(commit.title) |
| 16 | |
| 17 | if (!match) { |
| 18 | return null |
| 19 | } |
| 20 | |
| 21 | const number = parseInt(match[1], 10) |
| 22 | |
| 23 | if (!number) { |
| 24 | return null |
| 25 | } |
| 26 | |
| 27 | const { data } = await github.connection.pullRequests.get({ |
| 28 | owner: github.repoDetails.user, |
| 29 | repo: github.repoDetails.repo, |
| 30 | number, |
| 31 | }) |
| 32 | |
| 33 | return data |
| 34 | } |
| 35 | |
| 36 | const getSectionForPullRequest = (pullRequest) => { |
| 37 | const { labels } = pullRequest |
no test coverage detected
searching dependent graphs…