How to use the @octokit/app function in @octokit/app

To help you get started, we’ve selected a few @octokit/app examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ktk-2005 / Feedbacker-Forum / server / src / githubapp.js View on Github external
export function initializeGitHubApp() {
  if (!config.github) {
    logger.warn('GitHub integration not initialized, missing config.')
    return
  }
  const { id, privateKey, clientId, clientSecret } = config.github
  if (!(id && privateKey && clientId && clientSecret)) {
    logger.warn('Invalid GitHub config, not initialized.')
    return
  }

  githubApp = new App({ id, privateKey })
  githubAuth = new ClientOAuth2({
    clientId,
    clientSecret,
    accessTokenUri: 'https://github.com/login/oauth/access_token',
    authorizationUri: 'https://github.com/login/oauth/authorize',
    redirectUri: `${config.siteUrl}/api/github/oauth2callback`,
  })
}

@octokit/app

GitHub Apps toolset for Node.js

MIT
Latest version published 1 month ago

Package Health Score

86 / 100
Full package analysis

Popular @octokit/app functions

Similar packages