Beispiel #1
0
          " => " + componentLead + "")

    def nametuple(x):
        return {"name": x}

    def quote(x):
        return '"' + x + '"'

    # see JIRA_components listing in components.py
    from components import NN_components

    for name, comps in NN_components.iteritems():
        for firstcomponent in comps:
            break
        cms = map(nametuple, comps)
        componentLead = queryComponentLead(CL, firstcomponent, 0)
        #print(name + "->" + str(cms) + " => " + componentLead)

        compnnsearch = jiraserver + '/issues/?jql=' + urllib.quote_plus(
            nnsearchquery + " and component in (" +
            ",".join(map(quote, comps)) + ")")

        query_links = '\n\n Queries:\n' + \
         '* [Completed ' + name + ' JIRAs marked N&N|' + compnnsearch + ']\n' + \
         '* [All Completed JIRAs marked N&N|' + nnsearch + ']\n' + \
         '* [N&N Task JIRAs for this milestone|' + jiraserver + '/issues/?jql=' + urllib.quote_plus(nnissuesquerythisversion) + ']\n' + \
         '* [All N&N Task JIRAs|' + jiraserver + '/issues/?jql=' + urllib.quote_plus(nnissuesqueryall) + ']\n\n'

        childnn_description_milestone = \
         queryComponentLead(CL, firstcomponent, 1) + ",\n\n" + \
         'Search for your component\'s New and Noteworthy issues:' + query_links + \
Beispiel #2
0
    tmpsubdir = workingdir + "/tmplostpatches"
    try:
        os.stat(tmpsubdir)
    except:
        os.mkdir(tmpsubdir)

    os.chdir(tmpsubdir)

    # see JIRA_components listing in components.py
    from components import JIRA_components

    for name, comps in JIRA_components.iteritems():
        for firstcomponent in comps:
            break
        cms = map(nametuple, comps)
        componentLead = queryComponentLead(CLJBIDE, firstcomponent, 0)
        #print(name + "->" + str(cms) + " => " + componentLead)
        workingdir = os.getcwd()
        # skip if name contains spaces in components.py
        if " " not in name.rstrip():
            subfoldername = "jbosstools-" + name.lower()
            githubrepo = "https://github.com/jbosstools/" + subfoldername.strip(
            ) + ".git"
            print githubrepo
            # use shallow clone for faster checkout
            os.system("git clone --depth 1 " + githubrepo)
            os.chdir(workingdir + "/" + subfoldername.strip())
            p = Popen(
                ['bash', '../../findlostpatchesonerepository.sh', frombranch],
                stdout=PIPE,
                stderr=PIPE,
			failureDetails = failureDetails + '{code:title=' + testurl + '' + className_re + '/' + name_re + '}\n'
			failureDetails = failureDetails + prettyXML(s)
			failureDetails = failureDetails + '\n{code}\n\n'
			#print failureDetails

		rootJBIDE_dict = {
			'project' : { 'key': 'JBIDE' },
			'summary' : str(len(testcaselist)) + ' Test Failure(s) in JBIDE ' + jbide_affectedversion + ' for ' + component + ' component',
			'description' :  failureSummary + failureDetails,
			'issuetype' : { 'name' : 'Task' },
			'priority' : { 'name' :'Critical'},
			'versions' : [{ "name" : jbide_affectedversion }],
			'components' : [{ "name" : component }],
			'labels' : [ "testfailure" ]
			}

		jira = JIRA(options={'server':jiraserver}, basic_auth=(options.usernameJIRA, options.passwordJIRA))
		CLJBIDE = jira.project_components(jira.project('JBIDE')) # full list of components in JBIDE
		rootJBIDE = jira.create_issue(fields=rootJBIDE_dict)
		componentLead = queryComponentLead(CLJBIDE, component, 0)
		try:
			jira.assign_issue(rootJBIDE, componentLead)
		except:
			print "[WARNING] Unexpected error! User {0} tried to assign {1} to {2}: {3}".format(options.usernameJIRA, rootJBIDE, componentLead, sys.exc_info()[0])
		accept = raw_input("\nAccept new JIRA " + jiraserver + '/browse/' + rootJBIDE.key + " => " + componentLead + " ? [Y/n] ")
		if accept.capitalize() in ["N"] :
			rootJBIDE.delete()

	# see JIRA_components listing in components.py

	# Sample usage: see createTestFailureJIRA.py.examples.txt
Beispiel #4
0
            },
            'versions': [{
                "name": jbide_affectedversion
            }],
            'components': [{
                "name": component
            }],
            'labels': ["testfailure"]
        }

        jira = JIRA(options={'server': jiraserver},
                    basic_auth=(options.usernameJIRA, options.passwordJIRA))
        CLJBIDE = jira.project_components(
            jira.project('JBIDE'))  # full list of components in JBIDE
        rootJBIDE = jira.create_issue(fields=rootJBIDE_dict)
        componentLead = queryComponentLead(CLJBIDE, component, 0)
        try:
            jira.assign_issue(rootJBIDE, componentLead)
        except:
            print "[WARNING] Unexpected error! User {0} tried to assign {1} to {2}: {3}".format(
                options.usernameJIRA, rootJBIDE, componentLead,
                sys.exc_info()[0])
        accept = raw_input("\nAccept new JIRA " + jiraserver + '/browse/' +
                           rootJBIDE.key + " => " + componentLead +
                           " ? [Y/n] ")
        if accept.capitalize() in ["N"]:
            rootJBIDE.delete()

    # see JIRA_components listing in components.py

    # Sample usage: see createTestFailureJIRA.py.examples.txt
            'issuetype': {
                'name': 'Task'
            },
            'priority': {
                'name': 'Blocker'
            },
            'fixVersions': [{
                "name": jbds_fixversion
            }],
            'components': [{
                "name": "installer"
            }],
            'labels': ["task"],
        }
        rootJBDS = jira.create_issue(fields=rootJBDS_dict)
        installerLead = queryComponentLead(CLJBDS, 'installer', 0)
        try:
            jira.assign_issue(rootJBDS, installerLead)
        except:
            if (not options.jiraonly):
                print "[WARNING] Unexpected error! User {0} tried to assign {1} to {2}: {3}".format(
                    options.usernameJIRA, rootJBDS, installerLead,
                    sys.exc_info()[0])
        if (options.jiraonly):
            print(rootJBDS.key)
        else:
            print("Task JIRA created for this milestone include:")
            print("")
            print("JBDS              : " + jiraserver + '/browse/' +
                  rootJBDS.key + " => " + installerLead)
	def quote(x):
		return '"' + x + '"'

	if not options.componentjbide and not options.componentjbds:
		rootJBDS_dict = {
			'project' : { 'key': 'JBDS' },
			'summary' : 'For JBDS ' + jbds_fixversion + ': ' + taskdescription,
			'description' : 'For JBDS ' + jbds_fixversion + ': ' + taskdescriptionfull + '\n\n[Search for all task JIRA|' + tasksearch + ']',
			'issuetype' : { 'name' : 'Task' },
			'priority' : { 'name' :'Blocker'},
			'fixVersions' : [{ "name" : jbds_fixversion }],
			'components' : [{ "name" : "installer" }],
			'labels' : [ "task" ],
			}
		rootJBDS = jira.create_issue(fields=rootJBDS_dict)
		installerLead = queryComponentLead(CLJBDS, 'installer', 0)
		try:
			jira.assign_issue(rootJBDS, installerLead)
		except:
			if (not options.jiraonly):
				print "[WARNING] Unexpected error! User {0} tried to assign {1} to {2}: {3}".format(options.usernameJIRA, rootJBDS, installerLead, sys.exc_info()[0])
		if (options.jiraonly):
			print(rootJBDS.key)
		else:
			print("Task JIRA created for this milestone include:")
			print("")
			print("JBDS              : " + jiraserver + '/browse/' + rootJBDS.key + " => " + installerLead)

		rootJBIDE_dict = {
			'project' : { 'key': 'JBIDE' },
			'summary' : 'For JBIDE ' + jbide_fixversion + ': ' + taskdescription,
	print("JBoss Tools       : " + jiraserver + '/browse/' + rootnn.key + " => " + componentLead + "")

	def nametuple(x):
		return { "name" : x }

	def quote(x):
		return '"' + x + '"'

	# see JIRA_components listing in components.py
	from components import NN_components

	for name, comps in NN_components.iteritems():
		for firstcomponent in comps:
			break
		cms = map(nametuple, comps)
		componentLead = queryComponentLead(CL, firstcomponent, 0)
		#print(name + "->" + str(cms) + " => " + componentLead)

		compnnsearch = jiraserver + '/issues/?jql=' + urllib.quote_plus(nnsearchquery + " and component in (" + ",".join(map(quote,comps)) + ")")

		query_links = '\n\n Queries:\n' + \
			'* [Completed ' + name + ' JIRAs marked N&N|' + compnnsearch + ']\n' + \
			'* [All Completed JIRAs marked N&N|' + nnsearch + ']\n' + \
			'* [N&N Task JIRAs for this milestone|' + jiraserver + '/issues/?jql=' + urllib.quote_plus(nnissuesquerythisversion) + ']\n' + \
			'* [All N&N Task JIRAs|' + jiraserver + '/issues/?jql=' + urllib.quote_plus(nnissuesqueryall) + ']\n\n'

		childnn_description_milestone = \
			queryComponentLead(CL, firstcomponent, 1) + ",\n\n" + \
			'Search for your component\'s New and Noteworthy issues:' + query_links + \
			'If no N&N issues are found for ' + name.strip() + ', check if there are issues that SHOULD have been labelled with *Labels =* _new_and_noteworthy_, and add them.\n\n ' + \
			'Document the ones relevant for ' + name.strip() + ' by submitting a pull request against:\n\n' + \