MCPcopy
hub / github.com/desktop/desktop / fetchPR

Function fetchPR

script/pr-api.ts:10–23  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

8}
9
10export 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
25export function createPR(
26 title: string,

Callers 1

convertToChangelogFormatFunction · 0.90

Calls 1

parseMethod · 0.65

Tested by

no test coverage detected