From 69ed55f1ec218351a40949154fb4dbc8a788ad42 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Wed, 20 Nov 2024 20:12:19 -0800 Subject: [PATCH] getPatch: use github ssh url --- src/getPatch.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/getPatch.js b/src/getPatch.js index 4e8fdf7..5e495f6 100644 --- a/src/getPatch.js +++ b/src/getPatch.js @@ -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 = `git@github.com:${owner}/${repo}.git` const clonePath = path.join(os.tmpdir(), `pr-${prnum}`) console.log(`Cloning ${cloneUrl} to ${clonePath}, manually`)