Skip to content

Instantly share code, notes, and snippets.

kobymeir /
Last active Jun 6, 2019 — forked from dzzh/
Inject source and target branches from Github pull request into TeamCity CI
#!/usr/bin/env python
import os
import sys
import json
from urllib.request import Request, urlopen # Python 3
from urllib2 import Request, urlopen # Python 2
kobymeir /
Last active Oct 15, 2017 — forked from VladRassokhin/
Simple bash functions library to say something to TeamCity. See will only printout messages if running under TeamCity, otherwise nothing will be printed out.
#!/usr/bin/env bash
# Documentation for TeamCity messages:
function __tc_encode {
# Only unicode characters are not supported
echo -n "$1" | sed "s/\([|']\)/\|\1/g; s/\[/\|\[/g; s/\]/\|\]/g; s/\r/\|r/g;" | sed ':a;N;$!ba;s/\n/|n/g'