From e91ab4d6efd206f5455d1e886a27c62c5e467d10 Mon Sep 17 00:00:00 2001 From: rich Date: Thu, 12 Sep 2024 10:18:03 +0100 Subject: [PATCH] Fix fetching dependencies I broke this with #27. I switched from passing repos as a second parameter to passing it as part of the object in the first parameter in the consuming function but not in the function signature itself. This format follows the signature the Octokit builtin functions use so I think it makes sense to align our approach with theirs. --- renovate/dependencyDashboard.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/renovate/dependencyDashboard.js b/renovate/dependencyDashboard.js index 007f429..6773b64 100644 --- a/renovate/dependencyDashboard.js +++ b/renovate/dependencyDashboard.js @@ -52,9 +52,7 @@ export const handleIssuesApiResponse = (response) => { return parseDependenciesFromDashboard(dependencyDashboardIssue); } +export const getDependenciesForRepo = ({ octokit, repository }) => { + return octokit.request(repository.issues_url).then(handleIssuesApiResponse); +}; -export const getDependenciesForRepo = ({ octokit }, repo) => { - return octokit - .request(repo.issues_url) - .then(handleIssuesApiResponse); -}