Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ovsds committed Aug 1, 2024
1 parent c7c9924 commit 85e5281
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class GitHubClient {
per_page: perPage,
page,
});
// TODO: delete this line
console.info(data); // eslint-disable-line no-console
return data.data.map((release) => ({
tagName: release.tag_name,
targetCommitish: release.target_commitish,
Expand All @@ -56,10 +58,11 @@ class GitHubClient {
}
}
if (releases.length < perPage) {
throw new Error(`No release found for targetCommitish: ${targetCommitish}, draft: ${draft}`);
break;
}
page += 1;
}
throw new Error(`No release found for targetCommitish: ${targetCommitish}, draft: ${draft}`);
});
}
}
Expand Down
7 changes: 6 additions & 1 deletion src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ class GitHubClient {
page,
});

// TODO: delete this line
console.info(data); // eslint-disable-line no-console

return data.data.map((release) => ({
tagName: release.tag_name,
targetCommitish: release.target_commitish,
Expand Down Expand Up @@ -79,11 +82,13 @@ class GitHubClient {
}

if (releases.length < perPage) {
throw new Error(`No release found for targetCommitish: ${targetCommitish}, draft: ${draft}`);
break;
}

page += 1;
}

throw new Error(`No release found for targetCommitish: ${targetCommitish}, draft: ${draft}`);
}
}

Expand Down

0 comments on commit 85e5281

Please sign in to comment.