Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ykpythemind committed Dec 29, 2021
1 parent 1d54116 commit e318229
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/integration.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,16 @@ const branchName = uuidv4();
title: `[Integration test] ${branchName}`,
});

console.log(resp);
pr = resp.data.number;

const commits = await octokit.pulls.listCommits({
owner,
repo,
pull_number: pr,
});
console.log(commits);
const commitsnum = commits.data.length;
const commitCount = commits.data.length;

const comment = await octokit.issues.createComment({
await octokit.issues.createComment({
owner,
repo,
issue_number: pr,
Expand All @@ -97,9 +95,9 @@ const branchName = uuidv4();
repo,
pull_number: pr,
});
const newCommitNum = commits.data.length;
const newCommitCount = commits.data.length;

if (commitsnum < newCommitNum) {
if (commitCount < newCommitCount) {
const lastCommit = commits.data.at(-1);
if (lastCommit.commit.message === "Apply prettier changes") {
console.log("found new commit!", lastCommit.commit);
Expand Down

0 comments on commit e318229

Please sign in to comment.