def __init__(self, *args, **kwargs): super(FetchTracker, self).__init__(*args, **kwargs) self._J = jira.Jira() self._cache = {}
if key[:2] == '--': output[key[2:].lower()] = val.lower() else: raise Exception('invalid parameter', key) return output if __name__ == '__main__': start = DEFAULT_START end = DEFAULT_END bb_ini = DEFAULT_BB_INI jira_ini = DEFAULT_JIRA_INI args = ParseArgs(sys.argv) for key in args.keys(): if key == 'start': start = datetime.datetime.fromisoformat(args[key]) elif key == 'end': end = datetime.datetime.fromisoformat(args[key]) elif key == 'bbini': bb_ini = args[key] elif key == 'jiraini': jira_ini = args[key] bb = bitbucket.Bitbucket() bb.loadConfig(bb_ini) bb.loadData(start, end) jira = jira.Jira() jira.loadConfig(jira_ini) jira.loadData(start, end)
import jira __URL = "http://jira.example.com" __USER = "******" __PASS = "******" __ISSUE = "VOL-1234" my_jira = jira.Jira(__URL, __USER, __PASS) my_issue = my_jira.get_issue(__ISSUE) print(my_issue.summary)
def setUp(self): self.jira_object = jira.Jira('ldfkjals', 'https://jira.mycompany/rest/api/2')