def projectStart(CASE_NO, fromSpec): """ print "Case no: " + str(CASE_NO) print "from: " + fromSpec """ #create new gitConnect object to talk to git gitConnection = GitConnect() #check for unsaved changes to source code gitConnection.checkForUnsavedChanges() #create new FogBugzConnect object to talk to FBAPI fbConnection = FogBugzConnect() #check for FogBugz case and clock in fbConnection.startCase(CASE_NO) #checkout or create branch with CASE_NO gitConnection.checkoutBranch(CASE_NO,fromSpec,fbConnection) settings = get_setting_dict() if not "viewOnStart" in settings or settings["viewOnStart"] == 1: fbConnection.view(CASE_NO) juche.info("Use work ship to commit your changes")
def projectStartTest(CASE_NO): gitConnection = GitConnect() gitConnection.checkForUnsavedChanges() fbConnection = FogBugzConnect() #get the appropriate cases out of FogBugz (parent,test) = fbConnection.getCaseTuple(CASE_NO) if not fbConnection.isReadyForTest(parent): print "This doesn't look ready to be tested (resolved/implemented)... are you sure about this? (press Enter to continue)" raw_input() gitConnection.fetch() gitConnection.checkoutBranch(parent,None,fbConnection) fbConnection.startCase(test,enforceNoTestCases=False) gitHubConnection = GitHubConnect() gitHubConnection.openPullRequestByName("work-%d" % CASE_NO)