Skip to content

Files

This branch is 6 commits behind github/platform-samples:master.

delete-repository-event

❌ Delete Repository Event

🎯 Purpose

This Ruby server:

  1. Listens for when a repository is deleted using the repository event and deleted action.

  2. Creates an issue in GITHUB_NOTIFICATION_REPOSITORY as a notification and includes:

    • a link to restore the repository
    • the delete repository payload

⚙️ Configuration

  1. See the webhooks documentation for information on how to create webhooks and configure your server.

  2. Set the following required environment variables:

    • GITHUB_HOST - the domain of the GitHub Enterprise instance. e.g. github.example.com
    • GITHUB_API_TOKEN - a Personal Access Token that has the ability to create an issue in the notification repository
    • GITHUB_NOTIFICATION_REPOSITORY - the repository in which to create the notification issue. e.g. github.example.com/administrative-notifications. Should be in the form of :owner/:repository.