Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAS version update - 6.3.0 #658

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 27 additions & 0 deletions .github/octokit/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {Octokit} from "@octokit/rest";
import {createAppAuth} from "@octokit/auth-app"

export const getAccessToken = async () => {

const {GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY} = process.env

const octoKitInstance = new Octokit({
authStrategy: createAppAuth,
auth: {
appId: GITHUB_APP_ID,
privateKey: GITHUB_APP_PRIVATE_KEY
}
});

const {data: installations} = await octoKitInstance.rest.apps.listInstallations()

if(!installations.length) {
throw new Error("No Installations found for this github app")
}

const installationId = installations[0].id;

const installationAccessToken = await octoKitInstance.rest.apps.createInstallationAccessToken({installation_id: installationId})

return installationAccessToken.data.token
}
253 changes: 253 additions & 0 deletions .github/octokit/node_modules/.package-lock.json

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

21 changes: 21 additions & 0 deletions .github/octokit/node_modules/@octokit/auth-app/LICENSE

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

Loading
Loading