Last active
December 20, 2015 23:29
-
-
Save florinel-chis/6212916 to your computer and use it in GitHub Desktop.
Shell script to create a pull_request hook (currently you cannot do this using the github interface)
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
#!/bin/bash | |
GIT_TOKEN="YOUR_TOKEN_HERE" | |
GIT_USER="YOUR_USER_HERE" | |
GIT_REPO="YOUR_REPO_HERE" | |
curl -X POST -H "Authorization: token $GIT_TOKEN" \ | |
--data '{"name": "web","active": true,"events": ["pull_request"],"config": {"url": "http://your.url.here/"}}' \ | |
https://api.github.com/repos/$GIT_USER/$GIT_REPO/hooks | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment