(id: number)
| 8 | } |
| 9 | |
| 10 | export function fetchPR(id: number): IAPIPR | null { |
| 11 | try { |
| 12 | const response = execSync( |
| 13 | `gh pr view ${id} --json title,body,headRefName,url`, |
| 14 | { |
| 15 | encoding: 'utf8', |
| 16 | } |
| 17 | ) |
| 18 | |
| 19 | return JSON.parse(response) |
| 20 | } catch (e) { |
| 21 | return null |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | export function createPR( |
| 26 | title: string, |
no test coverage detected