Skip to content

Commit

Permalink
Fix GitHub API request (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nef10 authored Apr 25, 2021
1 parent 0022d2d commit 0cf1f2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6228,7 +6228,7 @@ async function main() {
console.log(`No coverage report found at '${baseFile}', ignoring...`);
}

const pull_request = await octokit.pulls.get({
const { data } = await octokit.pulls.get({
owner: github_2.repo.owner,
repo: github_2.repo.repo,
pull_number: pr_number,
Expand All @@ -6237,9 +6237,9 @@ async function main() {
const options = {
repository: github_2.payload.repository.full_name,
prefix: `${process.env.GITHUB_WORKSPACE}/`,
commit: pull_request.head.sha,
head: pull_request.head.ref,
base: pull_request.base.ref,
commit: data.head.sha,
head: data.head.ref,
base: data.base.ref,
};

const lcov = await parse(raw);
Expand Down
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function main() {
console.log(`No coverage report found at '${baseFile}', ignoring...`);
}

const pull_request = await octokit.pulls.get({
const { data } = await octokit.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr_number,
Expand All @@ -34,9 +34,9 @@ async function main() {
const options = {
repository: context.payload.repository.full_name,
prefix: `${process.env.GITHUB_WORKSPACE}/`,
commit: pull_request.head.sha,
head: pull_request.head.ref,
base: pull_request.base.ref,
commit: data.head.sha,
head: data.head.ref,
base: data.base.ref,
};

const lcov = await parse(raw);
Expand Down

0 comments on commit 0cf1f2a

Please sign in to comment.