From c78bc516e815abbd39371f730451f3074e928d4c Mon Sep 17 00:00:00 2001 From: Luuk van Houdt Date: Fri, 14 May 2021 01:51:13 +0200 Subject: [PATCH] Fix client result parsing --- dist/index.js | 4 ++-- index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index e797c05..b53a39b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -21,9 +21,9 @@ async function run(inject = {}) { const token = getInput("token"); const client = getClient(token); - const releases = await client.repos.listReleases(context); + const { data } = await client.repos.listReleases(context); - const { changelog, latest } = getChangelogAndLatest(releases, inject); + const { changelog, latest } = getChangelogAndLatest(data, inject); setOutput("changelog", changelog); setOutput("latest", latest); diff --git a/index.js b/index.js index b246f76..a502239 100644 --- a/index.js +++ b/index.js @@ -15,9 +15,9 @@ async function run(inject = {}) { const token = getInput("token"); const client = getClient(token); - const releases = await client.repos.listReleases(context); + const { data } = await client.repos.listReleases(context); - const { changelog, latest } = getChangelogAndLatest(releases, inject); + const { changelog, latest } = getChangelogAndLatest(data, inject); setOutput("changelog", changelog); setOutput("latest", latest);