Skip to content

Commit

Permalink
use the auto paginate methods for octokit
Browse files Browse the repository at this point in the history
  • Loading branch information
craig-day committed Mar 23, 2021
1 parent c60e46c commit 232e6f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions action.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function initialTag(tag) {
}

async function existingTags() {
const { data: refs } = await octokit.git
.listMatchingRefs({
const { data: refs } = await octokit
.paginate(octokit.git.listMatchingRefs, {
...requestOpts,
ref: 'tags',
})
Expand All @@ -51,8 +51,8 @@ async function existingTags() {
}

async function commitsForBranch(branch) {
const { data: commits } = await octokit.repos
.listCommits({
const { data: commits } = await octokit
.paginate(octokit.repos.listCommits, {
...requestOpts,
sha: branch,
})
Expand Down

0 comments on commit 232e6f7

Please sign in to comment.