Last active
November 20, 2015 08:34
-
-
Save thobbs/1e2a5bb6dcd94153df33 to your computer and use it in GitHub Desktop.
Script to generate table of branch and test links for the Cassandra JIRA
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
#!/usr/bin/python | |
import sys | |
HEADER = "||branch||testall||dtest||" | |
BRANCH_TEMPLATE = "[{branch}|https://github.com/{username}/cassandra/tree/{branch}]" | |
TESTALL_TEMPLATE = "[testall|http://cassci.datastax.com/view/Dev/view/{username}/job/{username}-{branch}-testall]" | |
DTEST_TEMPLATE = "[dtest|http://cassci.datastax.com/view/Dev/view/{username}/job/{username}-{branch}-dtest]" | |
ROW_TEMPLATE = "|" + BRANCH_TEMPLATE + "|" + TESTALL_TEMPLATE + "|" + DTEST_TEMPLATE + "|" | |
def main(): | |
if len(sys.argv) < 3: | |
print >> sys.stderr, "Usage: python jiralinks.py <user_name> <branch_name> [<branch_name> ...]" | |
sys.exit(1) | |
print HEADER | |
username = sys.argv[1] | |
for branch_name in sys.argv[2:]: | |
print ROW_TEMPLATE.format(username=username, branch=branch_name) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was kind of hoping I could make a pull request to this, but appears I can't. Tiny tiny fix here:
https://gist.github.com/krummas/4c23e518b5c8191ef364/revisions