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