Skip to content

Commit

Permalink
Fix unsupported syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
tibdex committed Apr 6, 2021
1 parent 09a5dc7 commit eb061e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auto-update",
"version": "2.1.0",
"version": "2.1.1",
"license": "MIT",
"files": [
"action.yml",
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ const handleUnmergeablePullRequest = async (
repo,
});

const lastCommitDate = lastCommit.committer?.date;
const lastCommitter = lastCommit.committer;

if (!lastCommit) {
throw new Error(`Missing date on last commit ${sha}`);
if (!lastCommitter) {
throw new Error(`Missing committer on last commit ${sha}`);
}

const comments = await octokit.paginate(
"GET /repos/{owner}/{repo}/issues/{issue_number}/comments",
{
...context.repo,
issue_number: number,
since: lastCommitDate,
since: lastCommitter.date,
},
);

Expand Down

0 comments on commit eb061e6

Please sign in to comment.