Skip to content

Latest commit

 

History

History
100 lines (70 loc) · 2.33 KB

self-host.md

File metadata and controls

100 lines (70 loc) · 2.33 KB

Self-Hosted App

node

Table of Contents

Deploy a Self-Hosted Instance

Multiple options exist for deploying a self-hosted instance:

Install @repository-settings/app as a dependency of your own app (recommended)

This option offers you the most flexibility

Depend on the package from npm

npm install @repository-settings/app

Example node.js app

import {Server, Probot, ProbotOctokit} from 'probot';
import app from '@repository-settings/app';

async function start() {
  const log = getLog();
  const server = new Server({
    Probot: Probot.defaults({
      appId: process.env.APP_ID,
      privateKey: process.env.PRIVATE_KEY,
      secret: process.env.WEBHOOK_SECRET,
      Octokit: ProbotOctokit.defaults({
        baseUrl: process.env.GH_API
      }),
      log: log.child({
        name: 'repository-settings'
      })
    }),
    log: log.child({
      name: 'server'
    })
  });

  process.on('SIGTERM', async () => {
    console.log('Received SIGTERM, stopping server!');

    await server.stop();
  });

  await server.load(app);

  await server.start();
};

start();

Deploy a fork of this repository

Alternatively, you can fork this repository and modify to suit your environment.

Permissions & events

This plugin requires these Permissions & events for the GitHub Integration:

Permissions

  • Administration: Read & Write
  • Contents: Read only
  • Issues: Read & Write
  • Single file: Read & Write
    • Path: .github/settings.yml
  • Actions: Read only

Organization Permissions

  • Members: Read & Write

Events

  • Push
  • Repository