Upgrade octokit to v4.1.2
This commit is contained in:
parent
dbbcbe019d
commit
c1745a9831
1214 changed files with 160765 additions and 0 deletions
29
node_modules/@octokit/oauth-app/dist-src/methods/get-user-octokit.js
generated
vendored
Normal file
29
node_modules/@octokit/oauth-app/dist-src/methods/get-user-octokit.js
generated
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import { createOAuthUserAuth } from "@octokit/auth-oauth-user";
|
||||
import { emitEvent } from "../emit-event.js";
|
||||
async function getUserOctokitWithState(state, options) {
|
||||
return state.octokit.auth({
|
||||
type: "oauth-user",
|
||||
...options,
|
||||
async factory(options2) {
|
||||
const octokit = new state.Octokit({
|
||||
authStrategy: createOAuthUserAuth,
|
||||
auth: options2
|
||||
});
|
||||
const authentication = await octokit.auth({
|
||||
type: "get"
|
||||
});
|
||||
await emitEvent(state, {
|
||||
name: "token",
|
||||
action: "created",
|
||||
token: authentication.token,
|
||||
scopes: authentication.scopes,
|
||||
authentication,
|
||||
octokit
|
||||
});
|
||||
return octokit;
|
||||
}
|
||||
});
|
||||
}
|
||||
export {
|
||||
getUserOctokitWithState
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue