-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow setting review assignment limit
- Loading branch information
Showing
5 changed files
with
59 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,32 @@ gh webhook forward --repo=ehuss/triagebot-test --events=* \ | |
|
||
Where the value in `--secret` is the secret value you place in `GITHUB_WEBHOOK_SECRET` in the `.env` file, and `--repo` is the repo you want to test against. | ||
|
||
You can test webhooks with `cURL`. For example to test the Zulip hooks (commands sent to the | ||
Triagebot from the Rust lang Zulip), you start the triagebot on localhost:8000 and then simulate a | ||
Zulip hook payload: | ||
``` sh | ||
curl http://localhost:8000/zulip-hook \ | ||
-H "Content-Type: application/json" \ | ||
-d '{ | ||
"data": "<CMD>", | ||
"token": "<ZULIP_TOKEN>", | ||
"message": { | ||
"sender_id": <YOUR_ID>, | ||
"recipient_id": <YOUR_ID>, | ||
"sender_full_name": "Randolph Carter", | ||
"sender_email": "[email protected]", | ||
"type": "stream" | ||
} | ||
}' | ||
``` | ||
|
||
Where: | ||
- `CMD` is the exact command you would issue @triagebot on Zulip (ex. open a direct chat with the | ||
bot and send "work show") | ||
- `ZULIP_TOKEN`: can be anything. Must correspond to the env var `$ZULIP_TOKEN` on your workstation | ||
- `YOUR_ID`: your GitHub user ID. Must be existing in your local triagebot database (table `users` and as | ||
foreign key also in `review_prefs`) | ||
|
||
#### ngrok | ||
|
||
The following is an example of using <https://ngrok.com/> to provide webhook forwarding. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters