-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,16 +46,6 @@ export default async function getPatch ({ | |
} catch (err) { | ||
console.log(err) | ||
|
||
// since we failed to get the diff, we will try to get the PR body through cloning the source code | ||
const { data: repoResponse } = await github.request('GET /repos/{owner}/{repo}', { | ||
owner, | ||
repo, | ||
pull_number: prnum, | ||
headers: { | ||
'X-GitHub-Api-Version': '2022-11-28' | ||
} | ||
}) | ||
|
||
const { data: prResponse } = await github.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', { | ||
owner, | ||
repo, | ||
|
@@ -69,7 +59,7 @@ export default async function getPatch ({ | |
}) | ||
|
||
// clone the repo | ||
const cloneUrl = repoResponse.clone_url | ||
const cloneUrl = `[email protected]:${owner}/${repo}.git` | ||
const clonePath = path.join(os.tmpdir(), `pr-${prnum}`) | ||
|
||
console.log(`Cloning ${cloneUrl} to ${clonePath}, manually`) | ||
|