This file contains 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
// ==UserScript== | |
// @name Slack to Jira links | |
// @namespace ca.arndt.dan.slack.jiralinks | |
// @version 1 | |
// @description JIRA links in Slack | |
// @include https://*.slack.com/* | |
// @run-at document-end | |
// @grant unsafeWindow | |
// ==/UserScript== |
This file contains 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 | |
contains_element () { | |
local e | |
for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done | |
return 1 | |
} | |
protected_branches=("master" "develop") | |
# check each branch being pushed | |
while read local_ref local_sha remote_ref remote_sha |