Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from jira import JIRA
- import git
- username = 'almamgr'
- password = 'c0blmf!'
- host_bb = 'https://bitbucket.sco.alma.cl/'
- host_jira = 'https://ictjira.alma.cl/'
- local_repo_path = '~/workspace/alma/CURRENTLY_MOD/git/almasw'
- integration_branch = 'remotes/origin/testing/2018JAN'
- print "Checking if JIRA tickets were merged integration branch \"%s\"" % integration_branch
- jira = JIRA(server=host_jira, basic_auth=(username, password))
- issues = jira.search_issues('fixVersion = ONLINE-2018JAN AND component = "10 Telescope Calibration (TelCal)" AND status = Implemented')
- branch_lists = [issue.fields.customfield_11300 for issue in issues]
- unique_branches = set()
- for branch_list in branch_lists:
- for branch in branch_list:
- unique_branches.add(branch)
- repo = git.Repo(local_repo_path).git
- merged_branches = repo.branch('-a', '--merged', integration_branch)
- for branch in unique_branches:
- print "%s: %s" % (branch, branch in merged_branches)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement