Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucasmelin/gh-hook
🪝A GitHub CLI extension to easily manage your repository webhooks.
https://github.com/lucasmelin/gh-hook
bubbletea gh-extension github github-api go golang webhook webhooks
Last synced: about 1 month ago
JSON representation
🪝A GitHub CLI extension to easily manage your repository webhooks.
- Host: GitHub
- URL: https://github.com/lucasmelin/gh-hook
- Owner: lucasmelin
- License: mit
- Created: 2022-11-19T17:04:00.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-10T02:31:34.000Z (almost 2 years ago)
- Last Synced: 2024-11-20T14:33:24.296Z (about 2 months ago)
- Topics: bubbletea, gh-extension, github, github-api, go, golang, webhook, webhooks
- Language: Go
- Homepage:
- Size: 938 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gh-cli-extensions - **hook** - Extension to easily manage your github repository webhooks. (Github)
README
gh-hook
🪝 A GitHub CLI extension to easily manage your repository webhooks.
## ✨ Features
- Create a repository webhook
- Delete one or more repository webhooks
- List all repository webhooks## 📼 Demo
![gh-hook demo](vhs-tapes/demo.gif)
## 📦️ Installation
1. Install the `gh` CLI (requires v2.0.0 at a minimum).
2. Install this extension:
```sh
gh extension install lucasmelin/gh-hook
```## 🧑💻 Usage
Run using `gh hook`. Run `gh hook --help` for more info.
### Creating a webhook via a JSON file
By default, this extension will prompt for all the information needed to create a webhook when run with `gh hook create`. However, the `--file` flag allows for passing the webhook data via a JSON file instead, if you prefer:
```sh
$ cat hook.json
{
"active": true,
"events": [
"push",
"pull_request"
],
"config": {
"url": "https://example.com",
"content_type": "json",
"insecure_ssl": "0",
"secret": "somesecretpassphrase"
}
}$ gh hook create --file hook.json
Creating new webhook for gh-hook
Successfully created hook 🪝$ gh hook list
✓ 404339664 - https://example.com (pull_request, push)
```## Development
```sh
# Install the action locally
gh extension install .; gh hook
# View changes
go build && gh hook
```