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 | |
# | |
# usage: ./hexbot.sh 10 rainbow | |
# will print the string `rainbow` on the commandline in the colors | |
# that the hexbot responds with. | |
# | |
# Not specifying a string will print the nyancat | |
# fromhex A52A2A |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"net/http" | |
"github.com/bradleyfalzon/ghinstallation" | |
"github.com/google/go-github/github" | |
) |
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 | |
# | |
# Export $GITHUB_TOKEN with your access token | |
# | |
function get_build_status(){ | |
branch=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') | |
repo=$(git config --get remote.origin.url | egrep -Eo '/(\w+)' | cut -d '/' -f 2) | |
status=$(curl -s -u "$GITHUB_TOKEN:x-oauth-basic" https://api.github.com/repos/github/$repo/commits/$branch/status | jq '.state' | tr -d '"') |