Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 825 Bytes

File metadata and controls

25 lines (18 loc) · 825 Bytes

GitHub Repository Hook Management

This script manages hooks in your GitHub repositories. It retrieves all projects from the specified organization, checks for old hooks, deletes them if necessary, and adds new hooks.

Prerequisites

Before running the script, make sure you have the following:

  • Python 3.x installed
  • requests library installed (pip install requests)
  • config.ini file in the same directory as the script, containing the necessary configuration (see Configuration section below)

Configuration

Create a config.ini file in the same directory as the script with the following content:

[DEFAULT]
API_KEY = YOUR_GITHUB_API_KEY
REPO_OWNER = YOUR_ORGANIZATION_NAME
expired_hooks =
    https://old-hook-url-1.com
    https://old-hook-url-2.com
new_hook_url = https://new-hook-url.com