Skip to content

Commit

Permalink
Adding secrets testing script and doc #170
Browse files Browse the repository at this point in the history
  • Loading branch information
gm3dmo committed Oct 23, 2024
1 parent c3c9fce commit 7d9388c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
18 changes: 15 additions & 3 deletions docs/testing-webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,20 @@ You'll need an endpoint for your hook to deliver to. I like to use a cheap virtu

```shell
python -m venv pwrhook
```

```shell
source pwrhook/bin/activate
pip install piptools
pip-compile requirements-pwrhook.in
pip install -r requirements-pwrhook.txt
```

## Running the hook reciever
I like to start this in a tmux session if this is going to be a long running testing session.
## Repo setup
Running `create-webhook-with-secret.sh` will create a repository webhook with a secret, set to `repo_webhook_secret` defined in `.gh-api-examples.conf`

## Running the hook receiver
The tmux program is useful if this is going to be a long running test.

Activate your virtual environment:

Expand Down Expand Up @@ -44,8 +53,11 @@ Press CTRL+C to quit

```

Now make an event happen that will create an event that triggers the hook.
Create an event that triggers the hook:

```
./create-issue-comment.sh
```



1 change: 1 addition & 0 deletions requirements-pwrhook.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Flask

0 comments on commit 7d9388c

Please sign in to comment.