Skip to content

Commit

Permalink
fix: lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
hulk510 committed Jan 17, 2024
1 parent 7725e09 commit 088ef69
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
import * as core from '@actions/core'
import * as github from '@actions/github'

const getActionsCacheList = (
const deleteRefActionsCache = async (
octokit: ReturnType<typeof github.getOctokit>,
repo: { owner: string; repo: string },
ref: string
) => {
): Promise<void> => {
// Get the list of cache IDs
// https://github.com/octokit/plugin-paginate-rest.js#octokitpaginate
const iterator = octokit.paginate.iterator(
octokit.rest.actions.getActionsCacheList,
{
...repo,
ref: ref
ref
}
)
return iterator
}

const deleteRefActionsCache = async (
octokit: ReturnType<typeof github.getOctokit>,
repo: { owner: string; repo: string },
ref: string
) => {
const iterator = getActionsCacheList(octokit, repo, ref)

for await (const { data: cacheList } of iterator) {
for (const { id: cacheId } of cacheList) {
Expand Down

0 comments on commit 088ef69

Please sign in to comment.