Created
March 12, 2014 17:14
-
-
Save meatballhat/9511651 to your computer and use it in GitHub Desktop.
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 | |
| if [[ -z "$GITHUB_AUTH_TOKEN" ]] ; then | |
| echo 'ERROR: $GITHUB_AUTH_TOKEN must be set' | |
| exit 1 | |
| fi | |
| if [[ $# < 2 ]] ; then | |
| echo "Usage: $(basename $0) <owner/repo> <sha1>" | |
| exit 1 | |
| fi | |
| OWNER_REPO="$1" | |
| SHA="$2" | |
| exec curl \ | |
| -d '{ | |
| "state": "success", | |
| "target_url": "http://www.example.com/rofl", | |
| "description": "Green, you hosers!" | |
| }' \ | |
| -H 'Content-Type: application/json' \ | |
| -H "Authorization: token $GITHUB_AUTH_TOKEN" \ | |
| "https://api.github.com/repos/${OWNER_REPO}/statuses/${SHA}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment