Skip to content

Commit

Permalink
remove retry
Browse files Browse the repository at this point in the history
  • Loading branch information
tgymnich committed May 30, 2024
1 parent b4fff66 commit 23abc0e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 21 deletions.
10 changes: 1 addition & 9 deletions lib/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/main.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import * as core from '@actions/core';
import * as Github from '@actions/github'
import { Octokit } from "@octokit/rest";
import { retry } from "@octokit/plugin-retry";

const token = core.getInput('token', { required: true });
const context = Github.context;
const MyOctokit = Octokit.plugin(retry);

async function run() {
let owner = core.getInput('owner', { required: false }) || context.repo.owner;
Expand All @@ -21,13 +19,7 @@ async function run() {
const retries = parseInt(core.getInput('retries', { required: false })) ?? 4;
const retryAfter = parseInt(core.getInput('retry_after', { required: false })) ?? 60;

const octokit = new MyOctokit({
auth: token,
request: {
retries,
retryAfter,
},
});
const octokit = new Octokit({auth: token});

let r = await octokit.rest.repos.get({
owner,
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ES2022",
"module": "node16",
"module": "nodenext",
"rootDir": "./src",
"moduleResolution": "node16",
"moduleResolution": "nodenext",
"baseUrl": "./",
"sourceMap": true,
"outDir": "./lib",
Expand Down

0 comments on commit 23abc0e

Please sign in to comment.