how to test for broken links on incoming changes to the codebase (and not only validite URL syntax).
replace <1234>
with the desired MR number, and <main>
with the MR base branch name, and run
# | |
# a one-liner to get raw content from github enterprise, relying on basic authentication. | |
# eliminates the need to create an access token and incorporate it in the url. | |
# | |
# | |
# fill in the blanks: | |
# | |
# USER your login user name for authentication (you'll be prompted for password on the terminal) | |
# GHE_DOMAIN the github enterprise custom domain |
#!/usr/bin/env sh | |
usage() { | |
echo "show-ansi-colors <n>" | |
exit 0 | |
} | |
(( $# < 1 )) && usage | |
show_ansi_colors() { |
#!/usr/bin/env bash | |
main() { | |
log | |
log_ln "hi :)" | |
check_links $(cat -) | |
log_ln "bye bye!" | |
} |
#!/usr/bin/env bash | |
echo -e "\033[0mNC (No color)" | |
echo -e "\033[1;37mWHITE\t\033[0;30mBLACK" | |
echo -e "\033[0;34mBLUE\t\033[1;34mLIGHT_BLUE" | |
echo -e "\033[0;32mGREEN\t\033[1;32mLIGHT_GREEN" | |
echo -e "\033[0;36mCYAN\t\033[1;36mLIGHT_CYAN" | |
echo -e "\033[0;31mRED\t\033[1;31mLIGHT_RED" | |
echo -e "\033[0;35mPURPLE\t\033[1;35mLIGHT_PURPLE" | |
echo -e "\033[0;33mYELLOW\t\033[1;33mLIGHT_YELLOW" |
git fetch upstream | |
git checkout master | |
git rebase upstream/master | |
git push -f origin master |
#!/usr/bin/env bash | |
# example usage: | |
# | |
# json_response="$(curl --flag http://whatever.man)" # -> { "status": 22, "errors": [ { "message": "oh no!" } ] } | |
# errors="$(echo "$json_response" | json_get "errors")" | |
# [[ $errors ]] && { | |
# msg="$(echo "$errors" | json_get "0" | json_get "message")" | |
# } | |
json_get() { |
#!/usr/bin/env bash | |
function main() { | |
validate "$@" | |
set_name "$@" | |
if [[ "$2" == '-p' ]]; then | |
update_policy | |
fi | |
} |
(function (triggerIntervalSeconds) { | |
triggerIntervalSeconds = triggerIntervalSeconds || (60 * 5); | |
var runInterval = triggerIntervalSeconds * 1000; | |
var runBuildTimeout = 300; | |
function runBuild(done) { | |
var runBtn = jQuery("button:contains(Run)")[0]; | |
console.log('opening build run dialog...'); |