Add octokit retry plugin

- Added octokit plugin for automatic retries
- Removed un-imported dependency causing version conflicts
- Update dist for action with new retry plugin
- Update license cache
This commit is contained in:
Bryan Zwicker
2025-12-08 21:28:48 +00:00
parent 32da07cbb3
commit 1f33b7b9ca
34 changed files with 4398 additions and 2024 deletions

View File

@@ -1,5 +1,6 @@
import * as core from '@actions/core'
import * as github from '@actions/github'
import {retry} from '@octokit/plugin-retry'
const urlParse = /\/(?<ownerType>orgs|users)\/(?<ownerName>[^/]+)\/projects\/(?<projectNumber>\d+)/
@@ -44,7 +45,7 @@ export async function addToProject(): Promise<void> {
.filter(l => l.length > 0) ?? []
const labelOperator = core.getInput('label-operator').trim().toLocaleLowerCase()
const octokit = github.getOctokit(ghToken)
const octokit = github.getOctokit(ghToken, undefined, retry)
const issue = github.context.payload.issue ?? github.context.payload.pull_request
const issueLabels: string[] = (issue?.labels ?? []).map((l: {name: string}) => l.name.toLowerCase())