mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Updated @actions/* and @octokit/* dependencies (#477)
This commit is contained in:
+6
-4
@@ -1,10 +1,11 @@
|
||||
import * as core from "@actions/core";
|
||||
import { GitHub, getOctokitOptions } from "@actions/github/lib/utils";
|
||||
import { getOctokit } from "@actions/github";
|
||||
import { throttling } from "@octokit/plugin-throttling";
|
||||
|
||||
export const setupOctokit = (githubToken: string) => {
|
||||
return new (GitHub.plugin(throttling))(
|
||||
getOctokitOptions(githubToken, {
|
||||
return getOctokit(
|
||||
githubToken,
|
||||
{
|
||||
throttle: {
|
||||
onRateLimit: (retryAfter, options: any, octokit, retryCount) => {
|
||||
core.warning(
|
||||
@@ -32,7 +33,8 @@ export const setupOctokit = (githubToken: string) => {
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
},
|
||||
throttling
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user