| 119 | } |
| 120 | |
| 121 | export async function createIssueComment(owner, repo, pullNumber, body) { |
| 122 | try { |
| 123 | const { data } = await github.issues.createComment({ |
| 124 | owner, |
| 125 | repo, |
| 126 | issue_number: pullNumber, |
| 127 | body, |
| 128 | }) |
| 129 | return data |
| 130 | } catch (err) { |
| 131 | console.log(`error creating a review comment on PR ${pullNumber} in ${owner}/${repo}`) |
| 132 | throw err |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | // Search for a string in a file in code and return the array of paths to files that contain string |
| 137 | export async function getPathsWithMatchingStrings(strArr, org, repo) { |