Created
September 27, 2016 10:16
-
-
Save booyaa/e1948ebb8e82d1c0d495dec572638fff to your computer and use it in GitHub Desktop.
creating webhooks per repo
This file contains hidden or 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
| # https://developer.github.com/v3/repos/hooks/#create-a-hook | |
| REPO_OWNER=booyaa # could be parameterized | |
| REPO=hello-homu # could be parameterized | |
| curl -v -H "Authorization: token $GH_PAT" \ | |
| -H "Content-Type: application/json" \ | |
| -X POST https://api.github.com/repos/$REPO_OWNER/$REPO/hooks \ | |
| --data-binary "@payload.json" |
This file contains hidden or 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
| { | |
| "name": "web", | |
| "active": true, | |
| "events": [ | |
| "push", | |
| "pull_request" | |
| ], | |
| "config": { | |
| "url": "http://example.com/webhook", | |
| "content_type": "json" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment